mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
tractor refactor
This commit is contained in:
parent
3fe07554f1
commit
dbbdd8eff8
41
changelog
41
changelog
@ -1,42 +1,5 @@
|
||||
## Added
|
||||
* Plasma forge
|
||||
* Plasma-powered assembly machine
|
||||
* Used to produce lategame items that until now were regular assembler recipes
|
||||
* Can pass on plasma, 25% of the plasma energy that passes through a plasma forge is consumed
|
||||
* This allows plasma forges to be chained, or unused residue energy to be used in turbines
|
||||
* Parts that interact with the fusion reactor directly, like the collector chambers, are not compatible
|
||||
* Like all assembler-type machines, features custom animations (i spent a lot of time on those, please look at them for prolonged periods of time, ideally without blinking)
|
||||
* Base production rates for plasma forge exclusive recipes are very slow
|
||||
* Does not accept upgrades, however, can use up otherwise useless fission fragments and unstable isotopes to gain a temporary x4 speed bonus with no penalty
|
||||
* Can also assemble fusion reactor vessels, which are cheaper but need quantum circuits
|
||||
* Blank Redstone-over-Radio Panel
|
||||
* A cheap way of extending the size of RoR control consoles without needing unconfigured button or gauge panels
|
||||
* Now used to craft the other RoR panel variants
|
||||
* Redstone-over-Radio numeric display
|
||||
* Shows integer RoR values as numbers
|
||||
* Can have up to two display panels per block
|
||||
* Redstone-over-Radio Graph
|
||||
* Similar to the numerical display, but instead of showing the number, it logs it every half second and displays it on a graph
|
||||
|
||||
## Changed
|
||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||
* Hoppers and buckets can now be made out of steel
|
||||
* RoR gauges now show the lowest and highest configured value on the actual gauge
|
||||
* The steel sword now looks like a medieval broad sword with the appropriate scale
|
||||
* All remaining items have been removed from the template folder, siren tracks and plate stamps are now made in the anvil
|
||||
* Gerald assembly now requires stellar flux
|
||||
* The DFC parts are now made in the plasma forge, with the recipes being more expensive
|
||||
* The restrictions for firing Folly (using the scope, waiting for the startup) no longer apply to NPCs (which can never fulfill them anyway), allowing them to actually use it
|
||||
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldn't be broken
|
||||
* Fluid barrels now have a sideways connector when hooked up to pipes, bridging the two pixel gap
|
||||
* Redstone over radio panels now render with their unique parts in the inventory, making the items easier to tell apart
|
||||
* Removed the euphemium and DNT compound plate recipes from the anvil, they are now plasma forge exclusive
|
||||
|
||||
## Fixed
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
* Fixed HUD/jetpack toggle popup not working at all on multiplayer servers
|
||||
* Fixed assembly machine NEI handler not being able to handle all thirteen inputs at once
|
||||
* Fixed RBMK fuel channels playing the meltdown sound when broken while hot with meltdowns disabled
|
||||
* Fixed destroyer and crate minecarts having the same entity IDs, causing them to turn into each other when loading a save
|
||||
* Fixed GL state leak for ICF lasers
|
||||
* Fixed broken localization on some armor resistances
|
||||
* Fixed afterburn resistance on HEV not working
|
||||
* Fixed euphemium compound plate recipe not yielding four items as it should in the plasma forge
|
||||
@ -48,7 +48,7 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
||||
String autoPlate = "autoswitch.weldPlates";
|
||||
|
||||
// Plates
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.plateeuphemium").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.plateeuphemium").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_euphemium, 4))
|
||||
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.platednt").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
|
||||
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
|
||||
|
||||
@ -520,12 +520,6 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_bismuth, 1))).setTier(4));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new ComparableStack(ModItems.ingot_osmiridium)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_euphemium, 4))).setTier(6));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_dineutronium, 4))).setTier(7));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(TI.plate(), 2), new OreDictStack(STEEL.ingot(), 1), new OreDictStack(STEEL.bolt(), 4)},
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items;
|
||||
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -124,6 +125,6 @@ public abstract class ItemInventory implements IInventory {
|
||||
@Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; }
|
||||
@Override public int getInventoryStackLimit() { return 64; }
|
||||
|
||||
@Override public void openInventory() { player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:block.crateOpen", 1.0F, 0.8F); }
|
||||
@Override public void closeInventory() { player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:block.crateClose", 1.0F, 0.8F); }
|
||||
@Override public void openInventory() { player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, NTMSounds.CRATE_OPEN, 1.0F, 0.8F); }
|
||||
@Override public void closeInventory() { player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, NTMSounds.CRATE_CLOSE, 1.0F, 0.8F); }
|
||||
}
|
||||
|
||||
@ -4005,7 +4005,7 @@ public class ModItems {
|
||||
key = new ItemKey().setUnlocalizedName("key").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key");
|
||||
key_red = new ItemCustomLore().setUnlocalizedName("key_red").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":key_red");
|
||||
key_red_cracked = new ItemCustomLore().setUnlocalizedName("key_red_cracked").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":key_red_cracked");
|
||||
key_kit = new ItemCounterfitKeys().setUnlocalizedName("key_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key_pair");
|
||||
key_kit = new ItemCounterfeitKeys().setUnlocalizedName("key_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key_pair");
|
||||
key_fake = new ItemKey().setUnlocalizedName("key_fake").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key_gold");
|
||||
pin = new ItemCustomLore().setUnlocalizedName("pin").setMaxStackSize(8).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pin");
|
||||
padlock_rusty = new ItemLock(1).setUnlocalizedName("padlock_rusty").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":padlock_rusty");
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
@ -77,7 +78,7 @@ public class ItemAmmoContainer extends Item {
|
||||
if(remainder != null && remainder.stackSize > 0) player.dropPlayerItemWithRandomChoice(remainder, false);
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.unpack", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.UNPACK, 1.0F, 1.0F);
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
stack.stackSize--;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -63,12 +64,12 @@ public class ItemAnchorRemote extends ItemBattery {
|
||||
}
|
||||
|
||||
if(!stack.hasTagCompound()) {
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, 0.75F);
|
||||
world.playSoundAtEntity(player, NTMSounds.VANILLA_ORB, 0.25F, 0.75F);
|
||||
return stack;
|
||||
}
|
||||
|
||||
if(this.getCharge(stack) < 10_000) {
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, 0.75F);
|
||||
world.playSoundAtEntity(player, NTMSounds.VANILLA_ORB, 0.25F, 0.75F);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@ -85,7 +86,7 @@ public class ItemAnchorRemote extends ItemBattery {
|
||||
}
|
||||
|
||||
world.newExplosion(player, x + 0.5, y + 1 + player.height / 2, z + 0.5, 2F, false, false);
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, NTMSounds.VANILLA_TELEPORT, 1.0F, 1.0F);
|
||||
player.setPositionAndUpdate(x + 0.5, y + 1, z + 0.5);
|
||||
//world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
player.fallDistance = 0.0F;
|
||||
@ -97,7 +98,7 @@ public class ItemAnchorRemote extends ItemBattery {
|
||||
this.dischargeBattery(stack, 10_000);
|
||||
|
||||
} else {
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, 0.75F);
|
||||
world.playSoundAtEntity(player, NTMSounds.VANILLA_ORB, 0.25F, 0.75F);
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -10,43 +11,32 @@ import net.minecraft.world.World;
|
||||
|
||||
public class ItemBalefireMatch extends Item {
|
||||
|
||||
public ItemBalefireMatch() {
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(256);
|
||||
this.setCreativeTab(CreativeTabs.tabTools);
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
|
||||
|
||||
if (side == 0)
|
||||
--y;
|
||||
public ItemBalefireMatch() {
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(256);
|
||||
this.setCreativeTab(CreativeTabs.tabTools);
|
||||
}
|
||||
|
||||
if (side == 1)
|
||||
++y;
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
|
||||
|
||||
if (side == 2)
|
||||
--z;
|
||||
if(side == 0) --y;
|
||||
if(side == 1) ++y;
|
||||
if(side == 2) --z;
|
||||
if(side == 3) ++z;
|
||||
if(side == 4) --x;
|
||||
if(side == 5) ++x;
|
||||
|
||||
if (side == 3)
|
||||
++z;
|
||||
if(!player.canPlayerEdit(x, y, z, side, stack)) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (side == 4)
|
||||
--x;
|
||||
if(world.isAirBlock(x, y, z)) {
|
||||
world.playSoundEffect((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, NTMSounds.VANILLA_IGNITE, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(x, y, z, ModBlocks.balefire);
|
||||
}
|
||||
|
||||
if (side == 5)
|
||||
++x;
|
||||
|
||||
if (!player.canPlayerEdit(x, y, z, side, stack)) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (world.isAirBlock(x, y, z)) {
|
||||
world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(x, y, z, ModBlocks.balefire);
|
||||
}
|
||||
|
||||
stack.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
stack.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.items.IAnimatedItem;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.render.anim.AnimationEnums.ToolAnimation;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -56,7 +57,7 @@ public class ItemBoltgun extends Item implements IAnimatedItem<ToolAnimation> {
|
||||
if(slot != null) {
|
||||
if(slot.getItem() == bolt.getItem() && slot.getItemDamage() == bolt.getItemDamage()) {
|
||||
if(!world.isRemote) {
|
||||
world.playSoundAtEntity(entity, "hbm:item.boltgun", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.RIVET_GUN, 1.0F, 1.0F);
|
||||
player.inventory.decrStackSize(i, 1);
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, DamageSource.causePlayerDamage(player).setDamageBypassesArmor(), 10F);
|
||||
@ -93,7 +94,7 @@ public class ItemBoltgun extends Item implements IAnimatedItem<ToolAnimation> {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.boltgun", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.RIVET_GUN, 1.0F, 1.0F);
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
double off = 0.25;
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -24,8 +25,7 @@ public class ItemBombCaller extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add("Aim & click to call an airstrike!");
|
||||
|
||||
switch (stack.getItemDamage()) {
|
||||
@ -48,8 +48,7 @@ public class ItemBombCaller extends Item {
|
||||
int y = pos.blockY;
|
||||
int z = pos.blockZ;
|
||||
|
||||
if(!world.isRemote)
|
||||
{
|
||||
if(!world.isRemote) {
|
||||
EntityBomber bomber;
|
||||
switch(stack.getItemDamage()) {
|
||||
|
||||
@ -65,7 +64,7 @@ public class ItemBombCaller extends Item {
|
||||
}
|
||||
WorldUtil.loadAndSpawnEntityInWorld(bomber);
|
||||
player.addChatMessage(new ChatComponentText("Called in airstrike!"));
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
|
||||
}
|
||||
|
||||
@ -76,19 +75,17 @@ public class ItemBombCaller extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_)
|
||||
{
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 1));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 2));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 3));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 4));
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
list.add(new ItemStack(item, 1, 2));
|
||||
list.add(new ItemStack(item, 1, 3));
|
||||
list.add(new ItemStack(item, 1, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack p_77636_1_)
|
||||
{
|
||||
return p_77636_1_.getItemDamage() >= 4;
|
||||
public boolean hasEffect(ItemStack stack) {
|
||||
return stack.getItemDamage() >= 4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,11 +11,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCounterfitKeys extends Item {
|
||||
public class ItemCounterfeitKeys extends Item {
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int b, float f0, float f1, float f2)
|
||||
{
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int b, float f0, float f1, float f2) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityLockableBase) {
|
||||
@ -41,11 +40,10 @@ public class ItemCounterfitKeys extends Item {
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add("Use on a locked container to create two counterfeit keys!");
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretBaseArtillery;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -56,7 +57,7 @@ public class ItemDesignatorArtyRange extends Item {
|
||||
stack.stackTagCompound.setInteger("x", pos[0]);
|
||||
stack.stackTagCompound.setInteger("y", pos[1]);
|
||||
stack.stackTagCompound.setInteger("z", pos[2]);
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -81,7 +82,7 @@ public class ItemDesignatorArtyRange extends Item {
|
||||
if(te instanceof TileEntityTurretBaseArtillery) {
|
||||
TileEntityTurretBaseArtillery arty = (TileEntityTurretBaseArtillery) te;
|
||||
arty.enqueueTarget(x + 0.5, y + 0.5, z + 0.5);
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.tool;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.bomb.LaunchPad;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import api.hbm.item.IDesignatorItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -41,7 +42,7 @@ public class ItemDesingator extends Item implements IDesignatorItem {
|
||||
player.addChatMessage(new ChatComponentText("Position set!"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.bomb.LaunchPad;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import api.hbm.item.IDesignatorItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -47,7 +48,7 @@ public class ItemDesingatorRange extends Item implements IDesignatorItem {
|
||||
player.addChatMessage(new ChatComponentText("Position set to X:" + x + ", Z:" + z));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -48,7 +49,7 @@ public class ItemDetonator extends Item {
|
||||
.next("Position set!").color(EnumChatFormatting.GREEN).flush());
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 2.0F, 1.0F);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -72,7 +73,7 @@ public class ItemDetonator extends Item {
|
||||
int z = stack.stackTagCompound.getInteger("z");
|
||||
|
||||
if(world.getBlock(x, y, z) instanceof IBomb) {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
if(!world.isRemote) {
|
||||
BombReturnCode ret = ((IBomb) world.getBlock(x, y, z)).explode(world, x, y, z);
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -13,7 +14,7 @@ public class ItemDigammaDiagnostic extends Item {
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 1.0F, 1.0F);
|
||||
ContaminationUtil.printDiagnosticData(player);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.tool;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -29,11 +30,11 @@ public class ItemDiscord extends Item {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(pos.sideHit);
|
||||
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, NTMSounds.VANILLA_TELEPORT, 1.0F, 1.0F);
|
||||
|
||||
player.setPositionAndUpdate(pos.hitVec.xCoord + dir.offsetX, pos.hitVec.yCoord + dir.offsetY - 1, pos.hitVec.zCoord + dir.offsetZ);
|
||||
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, NTMSounds.VANILLA_TELEPORT, 1.0F, 1.0F);
|
||||
player.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -31,22 +32,18 @@ public class ItemDosimeter extends Item {
|
||||
if(x > 1E-5) {
|
||||
List<Integer> list = new ArrayList<Integer>();
|
||||
|
||||
if(x < 0.5)
|
||||
list.add(0);
|
||||
if(x < 1)
|
||||
list.add(1);
|
||||
if(x >= 0.5 && x < 2)
|
||||
list.add(2);
|
||||
if(x >= 1 && x >= 2)
|
||||
list.add(3);
|
||||
if(x < 0.5) list.add(0);
|
||||
if(x < 1) list.add(1);
|
||||
if(x >= 0.5 && x < 2) list.add(2);
|
||||
if(x >= 1 && x >= 2) list.add(3);
|
||||
|
||||
int r = list.get(rand.nextInt(list.size()));
|
||||
|
||||
if(r > 0)
|
||||
world.playSoundAtEntity(entity, "hbm:item.geiger" + r, 1.0F, 1.0F); //TODO: rip new sounds either from BM or FO3
|
||||
world.playSoundAtEntity(entity, NTMSounds.GEIGER_PREFIX + r, 1.0F, 1.0F);
|
||||
|
||||
} else if(rand.nextInt(100) == 0) {
|
||||
world.playSoundAtEntity(entity, "hbm:item.geiger"+ (1 + rand.nextInt(1)), 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.GEIGER_PREFIX + 1, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +52,7 @@ public class ItemDosimeter extends Item {
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 1.0F, 1.0F);
|
||||
ContaminationUtil.printDosimeterData(player);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
@ -65,7 +66,7 @@ public class ItemFilter extends Item {
|
||||
|
||||
ArmorUtil.installGasMaskFilter(helmet, copy);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.gasmaskScrew", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.FILTER_SCREW, 1.0F, 1.0F);
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
import com.hbm.items.armor.ArmorFSBPowered;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
@ -43,7 +44,7 @@ public class ItemFusionCore extends Item {
|
||||
|
||||
stack.stackSize--;
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.battery", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.SUIT_BATTERY, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -44,9 +45,9 @@ public class ItemGeigerCounter extends Item {
|
||||
int r = list.get(rand.nextInt(list.size()));
|
||||
|
||||
if(r > 0)
|
||||
world.playSoundAtEntity(entity, "hbm:item.geiger" + r, 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.GEIGER_PREFIX + r, 1.0F, 1.0F);
|
||||
} else if(rand.nextInt(50) == 0) {
|
||||
world.playSoundAtEntity(entity, "hbm:item.geiger"+ (1 + rand.nextInt(1)), 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.GEIGER_PREFIX + 1, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.interfaces.IHoldableWeapon;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
@ -46,11 +47,11 @@ public class ItemLaserDetonator extends Item implements IHoldableWeapon {
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!");
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("").nextTranslation(ret.getUnlocalizedMessage()).color(ret.wasSuccessful() ? EnumChatFormatting.YELLOW : EnumChatFormatting.RED).flush(), MainRegistry.proxy.ID_DETONATOR), (EntityPlayerMP) player);
|
||||
|
||||
} else {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 1.0F, 1.0F);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("").nextTranslation(BombReturnCode.ERROR_NO_BOMB.getUnlocalizedMessage()).color(EnumChatFormatting.RED).flush(), MainRegistry.proxy.ID_DETONATOR), (EntityPlayerMP) player);
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.machine.TileEntityLockableBase;
|
||||
import com.hbm.util.CompatExternal;
|
||||
|
||||
@ -32,7 +33,7 @@ public class ItemLock extends ItemKeyPin {
|
||||
tile.lock();
|
||||
tile.setMod(lockMod);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockHang", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.PADLOCK, 1.0F, 1.0F);
|
||||
stack.stackSize--;
|
||||
|
||||
return true;
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -16,43 +15,40 @@ import net.minecraft.world.World;
|
||||
public class ItemMS extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add("Lost but not forgotten");
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float a, float b, float c)
|
||||
{
|
||||
if(!world.isRemote) {
|
||||
if(world.getBlock(x, y, z) == ModBlocks.ntm_dirt) {
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float a, float b, float c) {
|
||||
if(!world.isRemote) {
|
||||
if(world.getBlock(x, y, z) == ModBlocks.ntm_dirt) {
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
|
||||
Random rand = new Random();
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 2));
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 3));
|
||||
|
||||
for(ItemStack sta : list) {
|
||||
float f = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, sta);
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 2));
|
||||
list.add(new ItemStack(ModItems.ingot_u238m2, 1, 3));
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)rand.nextGaussian() * f3;
|
||||
if(!world.isRemote)
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
for(ItemStack sta : list) {
|
||||
float f = itemRand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = itemRand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = itemRand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, sta);
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) itemRand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) itemRand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) itemRand.nextGaussian() * f3;
|
||||
if(!world.isRemote)
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -8,66 +10,31 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemMatch extends Item {
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
|
||||
{
|
||||
if (p_77648_3_.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_77648_7_ == 0)
|
||||
{
|
||||
--p_77648_5_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 1)
|
||||
{
|
||||
++p_77648_5_;
|
||||
}
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) return true;
|
||||
|
||||
if(side == 0) --y;
|
||||
if(side == 1) ++y;
|
||||
if(side == 2) --z;
|
||||
if(side == 3) ++z;
|
||||
if(side == 4) --x;
|
||||
if(side == 5) ++x;
|
||||
|
||||
if (p_77648_7_ == 2)
|
||||
{
|
||||
--p_77648_6_;
|
||||
}
|
||||
if(!player.canPlayerEdit(x, y, z, side, stack)) {
|
||||
return false;
|
||||
} else {
|
||||
if(world.getBlock(x, y, z).getMaterial() == Material.air) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.VANILLA_IGNITE, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(x, y, z, Blocks.fire);
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 3)
|
||||
{
|
||||
++p_77648_6_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 4)
|
||||
{
|
||||
--p_77648_4_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 5)
|
||||
{
|
||||
++p_77648_4_;
|
||||
}
|
||||
|
||||
if (!p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_).getMaterial() == Material.air)
|
||||
{
|
||||
p_77648_3_.playSoundEffect(p_77648_4_ + 0.5D, p_77648_5_ + 0.5D, p_77648_6_ + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.fire);
|
||||
}
|
||||
|
||||
if (!p_77648_2_.capabilities.isCreativeMode)
|
||||
{
|
||||
--p_77648_1_.stackSize;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
--stack.stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -35,7 +36,7 @@ public class ItemMeteorRemote extends Item {
|
||||
player.addChatMessage(new ChatComponentText("Watch your head!"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
player.swingItem();
|
||||
|
||||
return stack;
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -55,7 +56,7 @@ public class ItemMultiDetonator extends Item {
|
||||
.next("Position added!").color(EnumChatFormatting.GREEN).flush());
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 2.0F, 1.0F);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -102,7 +103,7 @@ public class ItemMultiDetonator extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
@ -117,7 +118,7 @@ public class ItemMultiDetonator extends Item {
|
||||
stack.stackTagCompound.setIntArray("yValues", new int[0]);
|
||||
stack.stackTagCompound.setIntArray("zValues", new int[0]);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BOOP, 2.0F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
@ -89,7 +90,7 @@ public class ItemOilDetector extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
|
||||
player.swingItem();
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarScreen;
|
||||
import com.hbm.util.CompatExternal;
|
||||
@ -25,6 +26,6 @@ public class ItemRadarLinker extends ItemCoordinateBase {
|
||||
|
||||
@Override
|
||||
public void onTargetSet(World world, int x, int y, int z, EntityPlayer player) {
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.tool;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -43,8 +44,8 @@ public class ItemRepairKit extends Item {
|
||||
}
|
||||
|
||||
if(didSomething) {
|
||||
if(this == ModItems.gun_kit_1) world.playSoundAtEntity(player, "hbm:item.spray", 1.0F, 1.0F);
|
||||
if(this == ModItems.gun_kit_2) world.playSoundAtEntity(player, "hbm:item.repair", 1.0F, 1.0F);
|
||||
if(this == ModItems.gun_kit_1) world.playSoundAtEntity(player, NTMSounds.SPRAY_CAN, 1.0F, 1.0F);
|
||||
if(this == ModItems.gun_kit_2) world.playSoundAtEntity(player, NTMSounds.REPAIR, 1.0F, 1.0F);
|
||||
|
||||
stack.damageItem(1, player);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ability.AvailableAbilities;
|
||||
import com.hbm.handler.ability.IWeaponAbility;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -53,7 +54,7 @@ public class ItemSwordAbility extends ItemSword {
|
||||
|
||||
// hacky hacky hack
|
||||
if(this == ModItems.mese_gavel)
|
||||
attacker.worldObj.playSoundAtEntity(victim, "hbm:weapon.whack", 3.0F, 1.F);
|
||||
attacker.worldObj.playSoundAtEntity(victim, NTMSounds.GAVEL, 3.0F, 1.F);
|
||||
|
||||
this.abilities.getWeaponAbilities().forEach((ability, level) -> {
|
||||
ability.onHit(level, attacker.worldObj, (EntityPlayer) attacker, victim, this);
|
||||
|
||||
@ -26,94 +26,91 @@ public class ItemSwordAbilityPower extends ItemSwordAbility implements IBatteryI
|
||||
}
|
||||
|
||||
@Override
|
||||
public void chargeBattery(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") + i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void chargeBattery(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") + i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharge(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void setCharge(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dischargeBattery(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", this.maxPower - i);
|
||||
}
|
||||
|
||||
if(stack.stackTagCompound.getLong("charge") < 0)
|
||||
stack.stackTagCompound.setLong("charge", 0);
|
||||
}
|
||||
}
|
||||
public void dischargeBattery(ItemStack stack, long i) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i);
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", this.maxPower - i);
|
||||
}
|
||||
|
||||
if(stack.stackTagCompound.getLong("charge") < 0)
|
||||
stack.stackTagCompound.setLong("charge", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCharge(ItemStack stack) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
return stack.stackTagCompound.getLong("charge");
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", ((ItemSwordAbilityPower)stack.getItem()).maxPower);
|
||||
return stack.stackTagCompound.getLong("charge");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
public long getCharge(ItemStack stack) {
|
||||
if(stack.getItem() instanceof ItemSwordAbilityPower) {
|
||||
if(stack.hasTagCompound()) {
|
||||
return stack.stackTagCompound.getLong("charge");
|
||||
} else {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("charge", ((ItemSwordAbilityPower) stack.getItem()).maxPower);
|
||||
return stack.stackTagCompound.getLong("charge");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showDurabilityBar(ItemStack stack) {
|
||||
|
||||
return getCharge(stack) < maxPower;
|
||||
}
|
||||
public boolean showDurabilityBar(ItemStack stack) {
|
||||
return getCharge(stack) < maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDurabilityForDisplay(ItemStack stack) {
|
||||
|
||||
return 1 - (double)getCharge(stack) / (double)maxPower;
|
||||
}
|
||||
public double getDurabilityForDisplay(ItemStack stack) {
|
||||
return 1 - (double) getCharge(stack) / (double) maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canOperate(ItemStack stack) {
|
||||
|
||||
return getCharge(stack) >= this.consumption;
|
||||
}
|
||||
protected boolean canOperate(ItemStack stack) {
|
||||
return getCharge(stack) >= this.consumption;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxCharge(ItemStack stack) {
|
||||
return maxPower;
|
||||
}
|
||||
public long getMaxCharge(ItemStack stack) {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getChargeRate(ItemStack stack) {
|
||||
return chargeRate;
|
||||
}
|
||||
public long getChargeRate(ItemStack stack) {
|
||||
return chargeRate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDischargeRate(ItemStack stack) {
|
||||
@ -121,13 +118,12 @@ public class ItemSwordAbilityPower extends ItemSwordAbility implements IBatteryI
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage)
|
||||
{
|
||||
this.dischargeBattery(stack, damage * consumption);
|
||||
}
|
||||
public void setDamage(ItemStack stack, int damage) {
|
||||
this.dischargeBattery(stack, damage * consumption);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDamageable() {
|
||||
return true;
|
||||
}
|
||||
public boolean isDamageable() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.items.tool;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -25,131 +24,10 @@ public class ItemSwordMeteorite extends ItemSwordAbility {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
|
||||
if (this == ModItems.meteorite_sword) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
|
||||
String[] lines = I18nUtil.resolveKeyArray(this.getUnlocalizedName()+ "desc");
|
||||
for(String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_seared) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.seared.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_reforged) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.reforged.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_hardened) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.hardened.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_alloyed) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.alloyed.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_machined) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.machined.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_treated) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.treated.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_etched) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.etched.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_bred) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.bred.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_irradiated) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.irradiated.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_fused) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.fused.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.meteorite_sword_baleful) {
|
||||
String[] lines = I18nUtil.resolveKeyArray("item.meteorite_sword.baleful.desc");
|
||||
for (String line : lines) {
|
||||
list.add(EnumChatFormatting.ITALIC + line);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_subatomic) {
|
||||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_void) {
|
||||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_clouded) {
|
||||
* list.add(EnumChatFormatting.ITALIC + "The sword to fell");
|
||||
* list.add(EnumChatFormatting.ITALIC + "The capital"); }
|
||||
*/
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_enchanted) {
|
||||
* list.add(EnumChatFormatting.ITALIC + "The sword to defeat");
|
||||
* list.add(EnumChatFormatting.ITALIC + "The country"); }
|
||||
*/
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_fstbmb) {
|
||||
* list.add(EnumChatFormatting.ITALIC + "The sword to end");
|
||||
* list.add(EnumChatFormatting.ITALIC + "The world"); }
|
||||
*/
|
||||
|
||||
/*
|
||||
* if(this == ModItems.meteorite_sword_digamma) {
|
||||
* list.add(EnumChatFormatting.ITALIC + "The sword to extinguish");
|
||||
* list.add(EnumChatFormatting.ITALIC + "The universe"); }
|
||||
*/
|
||||
|
||||
// meteorite_sword_duchess
|
||||
// meteorite_sword_queen
|
||||
// meteorite_sword_storm
|
||||
// §k
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,216 +0,0 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.turret.TurretBase;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
|
||||
public class ItemTurretControl extends Item {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean bool) {
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
|
||||
if(player.getHeldItem() != null && stack != null && player.getHeldItem().equals(stack)) {
|
||||
|
||||
if(stack.hasTagCompound()) {
|
||||
int x = stack.getTagCompound().getInteger("xCoord");
|
||||
int y = stack.getTagCompound().getInteger("yCoord");
|
||||
int z = stack.getTagCompound().getInteger("zCoord");
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te != null && te instanceof TileEntityTurretBaseNT) {
|
||||
TileEntityTurretBaseNT turret = (TileEntityTurretBaseNT) te;
|
||||
|
||||
MovingObjectPosition pos = Library.rayTrace(player, 200, 1, true, true, false);
|
||||
|
||||
if(pos == null)
|
||||
pos = Library.rayTrace(player, 200, 1);
|
||||
|
||||
if(pos != null) {
|
||||
|
||||
Vec3 vecOrigin = Vec3.createVectorHelper(player.posX, player.posY + player.eyeHeight - player.getYOffset(), player.posZ);
|
||||
Vec3 vecDestination = Vec3.createVectorHelper(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
//List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(player, player.boundingBox.addCoord(pos.blockX, pos.blockY, pos.blockZ).expand(1.0, 1.0, 1.0));
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(player, player.boundingBox.expand(200, 200, 200));
|
||||
|
||||
for(Entity e : list) {
|
||||
|
||||
if (e.canBeCollidedWith() && e != player) {
|
||||
|
||||
MovingObjectPosition mop = e.boundingBox.expand(0.2, 0.2, 0.2).calculateIntercept(vecOrigin, vecDestination);
|
||||
|
||||
if(mop != null) {
|
||||
|
||||
pos = mop;
|
||||
pos.typeOfHit = MovingObjectType.ENTITY;
|
||||
pos.entityHit = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(pos.typeOfHit == MovingObjectType.ENTITY) {
|
||||
turret.target = pos.entityHit;
|
||||
turret.turnTowards(turret.getEntityPos(pos.entityHit));
|
||||
|
||||
} else {
|
||||
turret.turnTowards(Vec3.createVectorHelper(pos.blockX + 0.5, pos.blockY + 0.5, pos.blockZ + 0.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
if(itemstack.stackTagCompound != null) {
|
||||
list.add("Linked to:");
|
||||
list.add("X: " + String.valueOf(itemstack.stackTagCompound.getInteger("xCoord")));
|
||||
list.add("Y: " + String.valueOf(itemstack.stackTagCompound.getInteger("yCoord")));
|
||||
list.add("Z: " + String.valueOf(itemstack.stackTagCompound.getInteger("zCoord")));
|
||||
} else {
|
||||
list.add("Please select a turret.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int fx, float fy, float fz, float f0) {
|
||||
|
||||
if(world.getBlock(x, y, z) instanceof TurretBase) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("xCoord", x);
|
||||
stack.stackTagCompound.setInteger("yCoord", y);
|
||||
stack.stackTagCompound.setInteger("zCoord", z);
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addChatMessage(new ChatComponentText("Turret Linked!"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(world.getBlock(x, y, z) instanceof BlockDummyable) {
|
||||
|
||||
int[] pos = ((BlockDummyable)world.getBlock(x, y, z)).findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
int ix = pos[0];
|
||||
int iy = pos[1];
|
||||
int iz = pos[2];
|
||||
|
||||
TileEntity te = world.getTileEntity(ix, iy, iz);
|
||||
|
||||
if(te instanceof TileEntityTurretBaseNT) {
|
||||
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("xCoord", ix);
|
||||
stack.stackTagCompound.setInteger("yCoord", iy);
|
||||
stack.stackTagCompound.setInteger("zCoord", iz);
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addChatMessage(new ChatComponentText("Turret Linked!"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int i) {
|
||||
|
||||
int j = this.getMaxItemUseDuration(stack) - i;
|
||||
ArrowLooseEvent event = new ArrowLooseEvent(player, stack, j);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
|
||||
j = event.charge;
|
||||
|
||||
if(stack.hasTagCompound()) {
|
||||
/// ///
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
||||
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
{
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
}
|
||||
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
World world = player.worldObj;
|
||||
|
||||
if(stack.hasTagCompound()) {
|
||||
|
||||
int x = stack.getTagCompound().getInteger("xCoord");
|
||||
int y = stack.getTagCompound().getInteger("yCoord");
|
||||
int z = stack.getTagCompound().getInteger("zCoord");
|
||||
|
||||
if(world.getBlock(x, y, z) instanceof TurretBase) {
|
||||
|
||||
/// ///
|
||||
}
|
||||
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityTurretBaseNT) {
|
||||
|
||||
TileEntityTurretBaseNT turret = (TileEntityTurretBaseNT) world.getTileEntity(x, y, z);
|
||||
|
||||
turret.manualSetup();
|
||||
if(!world.isRemote)
|
||||
turret.updateFiringTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,7 @@ import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
@ -61,7 +62,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
if(!world.isRemote) {
|
||||
entity.setHealth(0.0F);
|
||||
}
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.bonk", 3.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.BONK, 3.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_opener) {
|
||||
@ -76,7 +77,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
if(i == 3)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 1 * 60 * 20, 0));
|
||||
}
|
||||
world.playSoundAtEntity(entity, "random.anvil_land", 3.0F, 1.F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.VANILLA_ANVIL, 3.0F, 1.F);
|
||||
}
|
||||
|
||||
if(this == ModItems.ullapool_caber) {
|
||||
@ -96,31 +97,28 @@ public class WeaponSpecial extends ItemSword {
|
||||
entity.motionX += dX;
|
||||
entity.motionY += dY;
|
||||
entity.motionZ += dZ;
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.bang", 3.0F, 1.F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.BANG, 3.0F, 1.F);
|
||||
}
|
||||
|
||||
if(this == ModItems.shimmer_axe) {
|
||||
entity.setHealth(entity.getHealth() / 2);
|
||||
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.slice", 3.0F, 1.F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.SLICE, 3.0F, 1.F);
|
||||
}
|
||||
|
||||
if(this == ModItems.wood_gavel) {
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.whack", 3.0F, 1.F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.GAVEL, 3.0F, 1.F);
|
||||
}
|
||||
|
||||
if(this == ModItems.lead_gavel) {
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.whack", 3.0F, 1.F);
|
||||
|
||||
world.playSoundAtEntity(entity, NTMSounds.GAVEL, 3.0F, 1.F);
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 15 * 20, 4));
|
||||
}
|
||||
|
||||
if(this == ModItems.diamond_gavel) {
|
||||
|
||||
float ded = entity.getMaxHealth() / 3;
|
||||
entity.setHealth(entity.getHealth() - ded);
|
||||
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.whack", 3.0F, 1.F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.GAVEL, 3.0F, 1.F);
|
||||
}
|
||||
|
||||
if(this == ModItems.wrench) {
|
||||
@ -134,7 +132,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
entity.motionX += dX;
|
||||
entity.motionY += dY;
|
||||
entity.motionZ += dZ;
|
||||
world.playSoundAtEntity(entity, "random.anvil_land", 3.0F, 0.75F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.VANILLA_ANVIL, 3.0F, 0.75F);
|
||||
}
|
||||
|
||||
if(this == ModItems.memespoon && !world.isRemote) {
|
||||
@ -143,7 +141,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
return false;
|
||||
|
||||
if(entityPlayer.fallDistance >= 2) {
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.bang", 3.0F, 0.75F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.BANG, 3.0F, 0.75F);
|
||||
entity.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) entityPlayer), 50F);
|
||||
}
|
||||
|
||||
@ -157,7 +155,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
}
|
||||
|
||||
if(this == ModItems.stopsign || this == ModItems.sopsign)
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.stop", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(entity, NTMSounds.STOP, 1.0F, 1.0F);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -183,7 +181,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
rubble.motionX += dX;
|
||||
rubble.motionY += dY;
|
||||
rubble.motionZ += dZ;
|
||||
world.playSoundAtEntity(rubble, "hbm:weapon.bang", 3.0F, 1.0F);
|
||||
world.playSoundAtEntity(rubble, NTMSounds.BANG, 3.0F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
@ -196,7 +194,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
|
||||
if(this == ModItems.shimmer_axe) {
|
||||
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:weapon.kapeng", 3.0F, 1.0F);
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.KAPENG, 3.0F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
if(world.getBlock(x, y, z) != Blocks.air && world.getBlock(x, y, z).getExplosionResistance(null) < 6000) {
|
||||
|
||||
@ -125,6 +125,22 @@ public class NTMSounds {
|
||||
public static final String TECH_BOOP = "hbm:item.techBoop"; // boop
|
||||
public static final String TECH_BLEEP = "hbm:item.techBleep"; // blee-boo-bee-boop
|
||||
public static final String UPGRADE_PLUG = "hbm:item.upgradePlug"; // plok
|
||||
public static final String UNPACK = "hbm:item.unpack";
|
||||
public static final String RIVET_GUN = "hbm:item.boltgun";
|
||||
public static final String GEIGER_PREFIX = "hbm:item.geiger"; // needs a number appended to be a valid sound, 0-6
|
||||
public static final String FILTER_SCREW = "hbm:item.gasmaskScrew";
|
||||
public static final String SUIT_BATTERY = "hbm:item.battery";
|
||||
public static final String CRATE_OPEN = "hbm:block.crateOpen";
|
||||
public static final String CRATE_CLOSE = "hbm:block.crateClose";
|
||||
public static final String PADLOCK = "hbm:block.lockHang";
|
||||
public static final String SPRAY_CAN = "hbm:item.spray";
|
||||
public static final String REPAIR = "hbm:item.repair";
|
||||
public static final String GAVEL = "hbm:weapon.whack";
|
||||
public static final String BONK = "hbm:weapon.bonk";
|
||||
public static final String STOP = "hbm:weapon.stop"; // STAHP
|
||||
public static final String BANG = "hbm:weapon.bang"; // frying pan
|
||||
public static final String SLICE = "hbm:weapon.slice";
|
||||
public static final String KAPENG = "hbm:weapon.kapeng"; // third degree
|
||||
|
||||
/// VANILLA CRAP I CANNOT BE ASSED TO REMEMBER ///
|
||||
public static final String VANILLA_ORB = "random.orb"; // xp orb ping
|
||||
@ -132,6 +148,9 @@ public class NTMSounds {
|
||||
public static final String VANILLA_FIREWORKS_BANG = "fireworks.blast";
|
||||
public static final String VANILLA_HISS = "random.fizz"; // fire extinguishes
|
||||
public static final String VANILLA_FIRE = "fire.fire"; // fire crackles
|
||||
public static final String VANILLA_IGNITE = "fire.ignite"; // flint and steel
|
||||
public static final String VANILLA_MINECART = "minecart.base"; // minecart rolling loop
|
||||
public static final String VANILLA_GIB = "mob.zombie.woodbreak"; // zombie breaks door down
|
||||
public static final String VANILLA_TELEPORT = "mob.endermen.portal"; // enderman teleports
|
||||
public static final String VANILLA_ANVIL = "random.anvil_land"; // falling anvil lands
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user