diff --git a/com/hbm/blocks/BlockMush.java b/com/hbm/blocks/BlockMush.java index 5f884366d..39412ae54 100644 --- a/com/hbm/blocks/BlockMush.java +++ b/com/hbm/blocks/BlockMush.java @@ -2,20 +2,13 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.main.MainRegistry; import com.hbm.world.HugeMush; -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.Block; -import net.minecraft.block.BlockMushroom; import net.minecraft.block.IGrowable; import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenBigMushroom; -import net.minecraftforge.common.util.ForgeDirection; public class BlockMush extends Block implements IGrowable { @@ -31,12 +24,14 @@ public class BlockMush extends Block implements IGrowable { return p_149854_1_.func_149730_j(); } - public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) + @Override + public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { return super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.canBlockStay(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_); } - public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_) + @Override + public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_) { if (p_149718_3_ >= 0 && p_149718_3_ < 256) { @@ -61,16 +56,19 @@ public class BlockMush extends Block implements IGrowable { return true; } - public boolean func_149851_a(World p_149851_1_, int p_149851_2_, int p_149851_3_, int p_149851_4_, boolean p_149851_5_) + @Override + public boolean func_149851_a(World p_149851_1_, int p_149851_2_, int p_149851_3_, int p_149851_4_, boolean p_149851_5_) { return true; } - public boolean func_149852_a(World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_, int p_149852_5_) + @Override + public boolean func_149852_a(World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_, int p_149852_5_) { - return (double)p_149852_2_.nextFloat() < 0.4D; + return p_149852_2_.nextFloat() < 0.4D; } - public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; } @@ -79,7 +77,8 @@ public class BlockMush extends Block implements IGrowable { * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. */ - public boolean isOpaqueCube() + @Override + public boolean isOpaqueCube() { return false; } @@ -87,7 +86,8 @@ public class BlockMush extends Block implements IGrowable { /** * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) */ - public boolean renderAsNormalBlock() + @Override + public boolean renderAsNormalBlock() { return false; } @@ -95,11 +95,13 @@ public class BlockMush extends Block implements IGrowable { /** * The type of render function that is called for this block */ - public int getRenderType() + @Override + public int getRenderType() { return 1; } - public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { super.onNeighborBlockChange(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_); this.checkAndDropBlock(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_); @@ -127,7 +129,8 @@ public class BlockMush extends Block implements IGrowable { } } - public void func_149853_b(World p_149853_1_, Random p_149853_2_, int p_149853_3_, int p_149853_4_, int p_149853_5_) + @Override + public void func_149853_b(World p_149853_1_, Random p_149853_2_, int p_149853_3_, int p_149853_4_, int p_149853_5_) { this.func_149884_c(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_, p_149853_2_); } diff --git a/com/hbm/blocks/BlockMushHuge.java b/com/hbm/blocks/BlockMushHuge.java index d181bf7b6..d20d73f36 100644 --- a/com/hbm/blocks/BlockMushHuge.java +++ b/com/hbm/blocks/BlockMushHuge.java @@ -9,7 +9,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.util.IIcon; import net.minecraft.world.World; @@ -23,18 +22,21 @@ public class BlockMushHuge extends Block { super(p_i45394_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.mush_block ? ":mush_block_skin" : ":mush_block_inside")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.mush_block ? ":mush_block_skin" : ":mush_block_stem")); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); } - public int quantityDropped(Random p_149745_1_) + @Override + public int quantityDropped(Random p_149745_1_) { int i = p_149745_1_.nextInt(10) - 7; @@ -46,12 +48,14 @@ public class BlockMushHuge extends Block { return i; } - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.mush); } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return Item.getItemFromBlock(ModBlocks.mush); diff --git a/com/hbm/blocks/BlockOre.java b/com/hbm/blocks/BlockOre.java index 31f624990..9ebfcdbd0 100644 --- a/com/hbm/blocks/BlockOre.java +++ b/com/hbm/blocks/BlockOre.java @@ -11,12 +11,9 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.potion.Potion; @@ -29,6 +26,7 @@ public class BlockOre extends Block { super(p_i45394_1_); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { if(this == ModBlocks.ore_fluorite) @@ -63,7 +61,8 @@ public class BlockOre extends Block { return Item.getItemFromBlock(this); } - public int quantityDropped(Random p_149745_1_) + @Override + public int quantityDropped(Random p_149745_1_) { if(this == ModBlocks.ore_fluorite) { @@ -81,12 +80,14 @@ public class BlockOre extends Block { return 1; } - public int damageDropped(int p_149692_1_) + @Override + public int damageDropped(int p_149692_1_) { return this == ModBlocks.waste_planks ? 1 : 0; } - public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) + @Override + public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) { if (entity instanceof EntityLivingBase && this == ModBlocks.frozen_dirt) { @@ -159,14 +160,15 @@ public class BlockOre extends Block { } } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) { super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_); if (this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red || this == ModBlocks.block_trinitite || this == ModBlocks.block_waste) { - p_149734_1_.spawnParticle("townaura", (double)((float)p_149734_2_ + p_149734_5_.nextFloat()), (double)((float)p_149734_3_ + 1.1F), (double)((float)p_149734_4_ + p_149734_5_.nextFloat()), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D); } } diff --git a/com/hbm/blocks/BombFlameWar.java b/com/hbm/blocks/BombFlameWar.java index 2d120838d..ec2789995 100644 --- a/com/hbm/blocks/BombFlameWar.java +++ b/com/hbm/blocks/BombFlameWar.java @@ -14,6 +14,7 @@ public class BombFlameWar extends Block { super(p_i45394_1_); } + @Override public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { this.worldObj = p_149695_1_; diff --git a/com/hbm/blocks/BombFloat.java b/com/hbm/blocks/BombFloat.java index 2553268d6..15523d024 100644 --- a/com/hbm/blocks/BombFloat.java +++ b/com/hbm/blocks/BombFloat.java @@ -23,17 +23,20 @@ public class BombFloat extends Block { super(p_i45394_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":bomb_float_top"); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":bomb_float"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); } + @Override public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { this.worldObj = p_149695_1_; diff --git a/com/hbm/blocks/BombMulti.java b/com/hbm/blocks/BombMulti.java index dc303d5cf..3272c4afb 100644 --- a/com/hbm/blocks/BombMulti.java +++ b/com/hbm/blocks/BombMulti.java @@ -8,11 +8,8 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -23,7 +20,6 @@ import net.minecraft.world.World; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionNukeGeneric; -import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -52,11 +48,13 @@ public class BombMulti extends BlockContainer { return new TileEntityBombMulti(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.bomb_multi); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -85,7 +83,7 @@ public class BombMulti extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -93,9 +91,9 @@ public class BombMulti extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -108,6 +106,7 @@ public class BombMulti extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -125,7 +124,8 @@ public class BombMulti extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityBombMulti entity = (TileEntityBombMulti) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -263,20 +263,24 @@ public class BombMulti extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -296,6 +300,7 @@ public class BombMulti extends BlockContainer { } } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; diff --git a/com/hbm/blocks/BombThermo.java b/com/hbm/blocks/BombThermo.java index c6b1357ef..166bd2d29 100644 --- a/com/hbm/blocks/BombThermo.java +++ b/com/hbm/blocks/BombThermo.java @@ -2,7 +2,6 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionThermo; import com.hbm.lib.RefStrings; @@ -27,12 +26,14 @@ public class BombThermo extends Block { super(p_i45394_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":therm_top"); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.therm_exo ? ":therm_exo" : ":therm_endo")); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { if(this == ModBlocks.therm_endo) @@ -43,11 +44,13 @@ public class BombThermo extends Block { return Item.getItemFromBlock(ModBlocks.therm_exo); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); } + @Override public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { this.worldObj = p_149695_1_; diff --git a/com/hbm/blocks/DecoBlock.java b/com/hbm/blocks/DecoBlock.java index d4d3ca913..64e5842ad 100644 --- a/com/hbm/blocks/DecoBlock.java +++ b/com/hbm/blocks/DecoBlock.java @@ -1,16 +1,10 @@ package com.hbm.blocks; -import java.util.List; - -import org.lwjgl.opengl.GL11; - import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,20 +20,24 @@ public class DecoBlock extends BlockContainer { return new TileEntityDecoBlock(); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -59,6 +57,7 @@ public class DecoBlock extends BlockContainer { } } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_); diff --git a/com/hbm/blocks/DecoBlockAlt.java b/com/hbm/blocks/DecoBlockAlt.java index 22f4bf27b..6a5f209c4 100644 --- a/com/hbm/blocks/DecoBlockAlt.java +++ b/com/hbm/blocks/DecoBlockAlt.java @@ -3,10 +3,6 @@ package com.hbm.blocks; import java.util.Random; import com.hbm.items.ModItems; -import com.hbm.lib.RefStrings; -import com.hbm.main.MainRegistry; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; @@ -14,11 +10,9 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -29,6 +23,7 @@ public class DecoBlockAlt extends BlockContainer { super(p_i45386_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("stone"); @@ -47,25 +42,30 @@ public class DecoBlockAlt extends BlockContainer { return null; } - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.statue_elb); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -85,6 +85,7 @@ public class DecoBlockAlt extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -148,6 +149,7 @@ public class DecoBlockAlt extends BlockContainer { return false; } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; diff --git a/com/hbm/blocks/DecoPoleSatelliteReceiver.java b/com/hbm/blocks/DecoPoleSatelliteReceiver.java index e62d3e7b2..e77b0e348 100644 --- a/com/hbm/blocks/DecoPoleSatelliteReceiver.java +++ b/com/hbm/blocks/DecoPoleSatelliteReceiver.java @@ -6,7 +6,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class DecoPoleSatelliteReceiver extends BlockContainer { @@ -20,20 +19,24 @@ public class DecoPoleSatelliteReceiver extends BlockContainer { return new TileEntityDecoPoleSatelliteReceiver(); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/DecoPoleTop.java b/com/hbm/blocks/DecoPoleTop.java index c130c4ffc..2d587b759 100644 --- a/com/hbm/blocks/DecoPoleTop.java +++ b/com/hbm/blocks/DecoPoleTop.java @@ -6,7 +6,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class DecoPoleTop extends BlockContainer { @@ -20,20 +19,24 @@ public class DecoPoleTop extends BlockContainer { return new TileEntityDecoPoleTop(); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/DecoSteelPoles.java b/com/hbm/blocks/DecoSteelPoles.java index c23f6c908..4e68a53d0 100644 --- a/com/hbm/blocks/DecoSteelPoles.java +++ b/com/hbm/blocks/DecoSteelPoles.java @@ -6,7 +6,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class DecoSteelPoles extends BlockContainer { @@ -20,20 +19,24 @@ public class DecoSteelPoles extends BlockContainer { return new TileEntityDecoSteelPoles(); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/DecoTapeRecorder.java b/com/hbm/blocks/DecoTapeRecorder.java index 1acfd825c..de47d95f0 100644 --- a/com/hbm/blocks/DecoTapeRecorder.java +++ b/com/hbm/blocks/DecoTapeRecorder.java @@ -19,20 +19,24 @@ public class DecoTapeRecorder extends BlockContainer{ return new TileEntityDecoTapeRecorder(); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/DetCord.java b/com/hbm/blocks/DetCord.java index e60770893..e88c7b2f7 100644 --- a/com/hbm/blocks/DetCord.java +++ b/com/hbm/blocks/DetCord.java @@ -14,7 +14,8 @@ public class DetCord extends Block { super(p_i45394_1_); } - public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) + @Override + public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) { if (!p_149723_1_.isRemote) { @@ -22,6 +23,7 @@ public class DetCord extends Block { } } + @Override public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -30,7 +32,8 @@ public class DetCord extends Block { } } - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return null; } diff --git a/com/hbm/blocks/Guide.java b/com/hbm/blocks/Guide.java index de585aa4f..2e0a9ec83 100644 --- a/com/hbm/blocks/Guide.java +++ b/com/hbm/blocks/Guide.java @@ -2,9 +2,6 @@ package com.hbm.blocks; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; -import com.hbm.main.MainRegistry; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; @@ -13,7 +10,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -35,6 +31,7 @@ public class Guide extends Block { super(p_i45394_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":guide_bottom"); @@ -45,6 +42,7 @@ public class Guide extends Block { this.iconRight = iconRegister.registerIcon(RefStrings.MODID + ":guide_side_right"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { if(metadata == 5) @@ -125,8 +123,9 @@ public class Guide extends Block { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -146,6 +145,7 @@ public class Guide extends Block { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(!player.isSneaking()) { diff --git a/com/hbm/blocks/LaunchPad.java b/com/hbm/blocks/LaunchPad.java index 5f7594c35..3416e9929 100644 --- a/com/hbm/blocks/LaunchPad.java +++ b/com/hbm/blocks/LaunchPad.java @@ -19,9 +19,6 @@ import com.hbm.entity.EntityMissileMirv; import com.hbm.entity.EntityMissileNuclear; import com.hbm.entity.EntityMissileRain; import com.hbm.entity.EntityMissileStrong; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.entity.EntityTestMissile; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; @@ -55,11 +52,13 @@ public class LaunchPad extends BlockContainer { return new TileEntityLaunchPad(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.launch_pad); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -74,13 +73,13 @@ public class LaunchPad extends BlockContainer { if (itemstack != null) { - float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f1 = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f2 = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F; while (itemstack.stackSize > 0) { - int j1 = this.field_149933_a.nextInt(21) + 10; + int j1 = LaunchPad.field_149933_a.nextInt(21) + 10; if (j1 > itemstack.stackSize) { @@ -88,7 +87,7 @@ public class LaunchPad extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -96,9 +95,9 @@ public class LaunchPad extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)LaunchPad.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)LaunchPad.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)LaunchPad.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -111,6 +110,7 @@ public class LaunchPad extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -128,7 +128,8 @@ public class LaunchPad extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityLaunchPad entity = (TileEntityLaunchPad) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -283,20 +284,24 @@ public class LaunchPad extends BlockContainer { } } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -381,6 +386,7 @@ public class LaunchPad extends BlockContainer { } } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; diff --git a/com/hbm/blocks/MachineBattery.java b/com/hbm/blocks/MachineBattery.java index 74c3b6156..7feb70302 100644 --- a/com/hbm/blocks/MachineBattery.java +++ b/com/hbm/blocks/MachineBattery.java @@ -36,22 +36,26 @@ public class MachineBattery extends BlockContainer { super(p_i45386_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_front_alt"); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_side_alt"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_battery); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -88,8 +92,9 @@ public class MachineBattery extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -119,7 +124,8 @@ public class MachineBattery extends BlockContainer { return new TileEntityMachineBattery(); } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityMachineBattery entity = (TileEntityMachineBattery) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -132,6 +138,7 @@ public class MachineBattery extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -149,6 +156,7 @@ public class MachineBattery extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -177,7 +185,7 @@ public class MachineBattery extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -185,9 +193,9 @@ public class MachineBattery extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } diff --git a/com/hbm/blocks/MachineCentrifuge.java b/com/hbm/blocks/MachineCentrifuge.java index f5f3b1d92..2b28a8da0 100644 --- a/com/hbm/blocks/MachineCentrifuge.java +++ b/com/hbm/blocks/MachineCentrifuge.java @@ -31,18 +31,22 @@ public class MachineCentrifuge extends BlockContainer { super(p_i45386_1_); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":machine_centrifuge"); @@ -53,13 +57,15 @@ public class MachineCentrifuge extends BlockContainer { return new TileEntityMachineCentrifuge(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_centrifuge); } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -79,6 +85,7 @@ public class MachineCentrifuge extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -107,7 +114,7 @@ public class MachineCentrifuge extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -115,9 +122,9 @@ public class MachineCentrifuge extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -130,6 +137,7 @@ public class MachineCentrifuge extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { diff --git a/com/hbm/blocks/MachineCoal.java b/com/hbm/blocks/MachineCoal.java index 62a3233ec..0a7940ac3 100644 --- a/com/hbm/blocks/MachineCoal.java +++ b/com/hbm/blocks/MachineCoal.java @@ -40,12 +40,14 @@ public class MachineCoal extends BlockContainer { isActive = blockState; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_coal_front_on" : ":machine_coal_front_off")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_coal_side"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { //Reactivate in case of emergency @@ -53,11 +55,13 @@ public class MachineCoal extends BlockContainer { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_coal_off); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -94,8 +98,9 @@ public class MachineCoal extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -120,6 +125,7 @@ public class MachineCoal extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -163,6 +169,7 @@ public class MachineCoal extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -191,7 +198,7 @@ public class MachineCoal extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -199,9 +206,9 @@ public class MachineCoal extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -214,15 +221,16 @@ public class MachineCoal extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (isActive) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; + float f2 = z + 0.5F; float f3 = 0.52F; float f4 = rand.nextFloat() * 0.6F - 0.3F; float f5 = rand.nextFloat(); @@ -230,23 +238,23 @@ public class MachineCoal extends BlockContainer { if (l == 4) { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 5) { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 2) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); } else if (l == 3) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); } } } diff --git a/com/hbm/blocks/MachineDeuterium.java b/com/hbm/blocks/MachineDeuterium.java index 7b97e763e..0514abc3d 100644 --- a/com/hbm/blocks/MachineDeuterium.java +++ b/com/hbm/blocks/MachineDeuterium.java @@ -34,12 +34,14 @@ public class MachineDeuterium extends BlockContainer { super(p_i45386_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_deuterium_side"); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_deuterium_front"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); @@ -50,11 +52,13 @@ public class MachineDeuterium extends BlockContainer { return new TileEntityMachineDeuterium(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_deuterium); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -72,6 +76,7 @@ public class MachineDeuterium extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -100,7 +105,7 @@ public class MachineDeuterium extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -108,9 +113,9 @@ public class MachineDeuterium extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -123,15 +128,16 @@ public class MachineDeuterium extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (((TileEntityMachineDeuterium) p_149734_1_.getTileEntity(x, y, z)).isProcessing()) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 1.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 1.0F; + float f2 = z + 0.5F; p_149734_1_.spawnParticle("cloud", f, f1, f2, 0.0D, 0.1D, 0.0D); } diff --git a/com/hbm/blocks/MachineDiFurnace.java b/com/hbm/blocks/MachineDiFurnace.java index 997e53772..dac5dfbd9 100644 --- a/com/hbm/blocks/MachineDiFurnace.java +++ b/com/hbm/blocks/MachineDiFurnace.java @@ -1,6 +1,5 @@ package com.hbm.blocks; -import java.util.List; import java.util.Random; import com.hbm.lib.RefStrings; @@ -16,12 +15,10 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -43,6 +40,7 @@ public class MachineDiFurnace extends BlockContainer { isActive = blockState; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":test_difurnace_top_on" : ":test_difurnace_top_off")); @@ -50,6 +48,7 @@ public class MachineDiFurnace extends BlockContainer { this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":test_difurnace_side"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { //Reactivate in case of emergency @@ -57,11 +56,13 @@ public class MachineDiFurnace extends BlockContainer { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : (side == 1 ? this.iconTop : this.blockIcon)); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_difurnace_off); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -98,8 +99,9 @@ public class MachineDiFurnace extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -124,6 +126,7 @@ public class MachineDiFurnace extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -167,6 +170,7 @@ public class MachineDiFurnace extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -195,7 +199,7 @@ public class MachineDiFurnace extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -203,9 +207,9 @@ public class MachineDiFurnace extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -218,15 +222,16 @@ public class MachineDiFurnace extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (isActive) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; + float f2 = z + 0.5F; float f3 = 0.52F; float f4 = rand.nextFloat() * 0.6F - 0.3F; float f5 = rand.nextFloat(); @@ -234,27 +239,27 @@ public class MachineDiFurnace extends BlockContainer { if (l == 4) { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); //p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("reddust", (double)(x + f5), (double)f1 + 1, (double)(z + f6), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("reddust", x + f5, (double)f1 + 1, z + f6, 0.0D, 0.0D, 0.0D); } else if (l == 5) { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); //p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("reddust", (double)(x + f5), (double)f1 + 1, (double)(z + f6), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("reddust", x + f5, (double)f1 + 1, z + f6, 0.0D, 0.0D, 0.0D); } else if (l == 2) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); //p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D) - p_149734_1_.spawnParticle("reddust", (double)(x + f5), (double)f1 + 1, (double)(z + f6), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("reddust", x + f5, (double)f1 + 1, z + f6, 0.0D, 0.0D, 0.0D); } else if (l == 3) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); //p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("reddust", (double)(x + f5), (double)f1 + 1, (double)(z + f6), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("reddust", x + f5, (double)f1 + 1, z + f6, 0.0D, 0.0D, 0.0D); } } } diff --git a/com/hbm/blocks/MachineElectricFurnace.java b/com/hbm/blocks/MachineElectricFurnace.java index e4243af58..28a02da67 100644 --- a/com/hbm/blocks/MachineElectricFurnace.java +++ b/com/hbm/blocks/MachineElectricFurnace.java @@ -39,12 +39,14 @@ public class MachineElectricFurnace extends BlockContainer { isActive = blockState; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_electric_furnace_front_on" : ":machine_electric_furnace_front_off")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_electric_furnace"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { //Reactivate in case of emergency @@ -52,11 +54,13 @@ public class MachineElectricFurnace extends BlockContainer { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -93,8 +97,9 @@ public class MachineElectricFurnace extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -119,6 +124,7 @@ public class MachineElectricFurnace extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -162,6 +168,7 @@ public class MachineElectricFurnace extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -190,7 +197,7 @@ public class MachineElectricFurnace extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -198,9 +205,9 @@ public class MachineElectricFurnace extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -213,15 +220,16 @@ public class MachineElectricFurnace extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (isActive) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; + float f2 = z + 0.5F; float f3 = 0.52F; float f4 = rand.nextFloat() * 0.6F - 0.3F; float f5 = rand.nextFloat(); @@ -229,23 +237,23 @@ public class MachineElectricFurnace extends BlockContainer { if (l == 4) { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 5) { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 2) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); } else if (l == 3) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); } } } diff --git a/com/hbm/blocks/MachineGenerator.java b/com/hbm/blocks/MachineGenerator.java index f31841b5a..ba65dd6b7 100644 --- a/com/hbm/blocks/MachineGenerator.java +++ b/com/hbm/blocks/MachineGenerator.java @@ -13,9 +13,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; @@ -23,7 +21,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; import net.minecraft.world.Explosion; import net.minecraft.world.World; @@ -44,22 +41,26 @@ public class MachineGenerator extends BlockContainer { rand = new Random(); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconSide = iconRegister.registerIcon(RefStrings.MODID + ":machine_generator_side"); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_generator"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 0 ? blockIcon : (side == 1 ? blockIcon : iconSide); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_generator); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -82,6 +83,7 @@ public class MachineGenerator extends BlockContainer { return new TileEntityMachineGenerator(); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -110,7 +112,7 @@ public class MachineGenerator extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -118,9 +120,9 @@ public class MachineGenerator extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -133,7 +135,8 @@ public class MachineGenerator extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } - public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) + @Override + public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) { if (!p_149723_1_.isRemote) { diff --git a/com/hbm/blocks/MachineNukeFurnace.java b/com/hbm/blocks/MachineNukeFurnace.java index eb54f463a..f52c5f0e6 100644 --- a/com/hbm/blocks/MachineNukeFurnace.java +++ b/com/hbm/blocks/MachineNukeFurnace.java @@ -39,22 +39,26 @@ public class MachineNukeFurnace extends BlockContainer { isActive = blockState; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_nuke_furnace_front_on" : ":machine_nuke_furnace_front_off")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_steel"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -91,8 +95,9 @@ public class MachineNukeFurnace extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -117,6 +122,7 @@ public class MachineNukeFurnace extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -160,6 +166,7 @@ public class MachineNukeFurnace extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -188,7 +195,7 @@ public class MachineNukeFurnace extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -196,9 +203,9 @@ public class MachineNukeFurnace extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -211,15 +218,16 @@ public class MachineNukeFurnace extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (isActive) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; + float f2 = z + 0.5F; float f3 = 0.52F; float f4 = rand.nextFloat() * 0.6F - 0.3F; float f5 = rand.nextFloat(); @@ -227,23 +235,23 @@ public class MachineNukeFurnace extends BlockContainer { if (l == 4) { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 5) { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 2) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); } else if (l == 3) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); } } } diff --git a/com/hbm/blocks/MachinePuF6Tank.java b/com/hbm/blocks/MachinePuF6Tank.java index 221624b57..677fcea31 100644 --- a/com/hbm/blocks/MachinePuF6Tank.java +++ b/com/hbm/blocks/MachinePuF6Tank.java @@ -19,7 +19,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -32,18 +31,22 @@ public class MachinePuF6Tank extends BlockContainer { super(p_i45386_1_); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":machine_puf6_tank"); @@ -54,13 +57,15 @@ public class MachinePuF6Tank extends BlockContainer { return new TileEntityMachinePuF6Tank(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_puf6_tank); } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -80,6 +85,7 @@ public class MachinePuF6Tank extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -108,7 +114,7 @@ public class MachinePuF6Tank extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -116,9 +122,9 @@ public class MachinePuF6Tank extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -131,6 +137,7 @@ public class MachinePuF6Tank extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { diff --git a/com/hbm/blocks/MachineReactor.java b/com/hbm/blocks/MachineReactor.java index 76051a038..11c841f94 100644 --- a/com/hbm/blocks/MachineReactor.java +++ b/com/hbm/blocks/MachineReactor.java @@ -1,6 +1,5 @@ package com.hbm.blocks; -import java.util.List; import java.util.Random; import com.hbm.lib.RefStrings; @@ -16,12 +15,10 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -40,6 +37,7 @@ public class MachineReactor extends BlockContainer { super(p_i45386_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (":reactor_top")); @@ -48,16 +46,19 @@ public class MachineReactor extends BlockContainer { this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":reactor_side"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_reactor); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -94,8 +95,9 @@ public class MachineReactor extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -120,6 +122,7 @@ public class MachineReactor extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -142,6 +145,7 @@ public class MachineReactor extends BlockContainer { return new TileEntityMachineReactor(); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (true) @@ -170,7 +174,7 @@ public class MachineReactor extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -178,9 +182,9 @@ public class MachineReactor extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } diff --git a/com/hbm/blocks/MachineRtgFurnace.java b/com/hbm/blocks/MachineRtgFurnace.java index c4e2c55a7..f99077b09 100644 --- a/com/hbm/blocks/MachineRtgFurnace.java +++ b/com/hbm/blocks/MachineRtgFurnace.java @@ -40,22 +40,26 @@ public class MachineRtgFurnace extends BlockContainer { isActive = blockState; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_rtg_furnace_on" : ":machine_rtg_furnace_off")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_tungsten"); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_rtg_furnace_off); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); @@ -92,8 +96,9 @@ public class MachineRtgFurnace extends BlockContainer { } } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -118,6 +123,7 @@ public class MachineRtgFurnace extends BlockContainer { } } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -161,6 +167,7 @@ public class MachineRtgFurnace extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -189,7 +196,7 @@ public class MachineRtgFurnace extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -197,9 +204,9 @@ public class MachineRtgFurnace extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -212,15 +219,16 @@ public class MachineRtgFurnace extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand) { if (isActive) { int l = p_149734_1_.getBlockMetadata(x, y, z); - float f = (float)x + 0.5F; - float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; - float f2 = (float)z + 0.5F; + float f = x + 0.5F; + float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F; + float f2 = z + 0.5F; float f3 = 0.52F; float f4 = rand.nextFloat() * 0.6F - 0.3F; float f5 = rand.nextFloat(); @@ -228,23 +236,23 @@ public class MachineRtgFurnace extends BlockContainer { if (l == 4) { - p_149734_1_.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 5) { - p_149734_1_.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); } else if (l == 2) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); } else if (l == 3) { - p_149734_1_.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); - p_149734_1_.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); } } } diff --git a/com/hbm/blocks/MachineUF6Tank.java b/com/hbm/blocks/MachineUF6Tank.java index b4a181a2a..a4e0dfb14 100644 --- a/com/hbm/blocks/MachineUF6Tank.java +++ b/com/hbm/blocks/MachineUF6Tank.java @@ -19,7 +19,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -32,18 +31,22 @@ public class MachineUF6Tank extends BlockContainer { super(p_i45386_1_); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":machine_uf6_tank"); @@ -54,13 +57,15 @@ public class MachineUF6Tank extends BlockContainer { return new TileEntityMachineUF6Tank(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.machine_uf6_tank); } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { @@ -80,6 +85,7 @@ public class MachineUF6Tank extends BlockContainer { } } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -108,7 +114,7 @@ public class MachineUF6Tank extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -116,9 +122,9 @@ public class MachineUF6Tank extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -131,6 +137,7 @@ public class MachineUF6Tank extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index e02a25fc3..f38d0e3c1 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -7,12 +7,7 @@ import com.hbm.main.MainRegistry; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; -import net.minecraft.block.BlockGlass; -import net.minecraft.block.BlockMushroom; import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; public class ModBlocks { diff --git a/com/hbm/blocks/NukeBoy.java b/com/hbm/blocks/NukeBoy.java index ae0552248..e36e31258 100644 --- a/com/hbm/blocks/NukeBoy.java +++ b/com/hbm/blocks/NukeBoy.java @@ -1,38 +1,24 @@ package com.hbm.blocks; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosion; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; -import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentProtection; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class NukeBoy extends BlockContainer { @@ -51,11 +37,13 @@ public class NukeBoy extends BlockContainer { return new TileEntityNukeBoy(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_boy); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -70,13 +58,13 @@ public class NukeBoy extends BlockContainer { if (itemstack != null) { - float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f1 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f2 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; while (itemstack.stackSize > 0) { - int j1 = this.field_149933_a.nextInt(21) + 10; + int j1 = NukeBoy.field_149933_a.nextInt(21) + 10; if (j1 > itemstack.stackSize) { @@ -84,7 +72,7 @@ public class NukeBoy extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -92,9 +80,9 @@ public class NukeBoy extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)NukeBoy.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)NukeBoy.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)NukeBoy.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -107,6 +95,7 @@ public class NukeBoy extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -124,7 +113,8 @@ public class NukeBoy extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeBoy entity = (TileEntityNukeBoy) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -183,20 +173,24 @@ public class NukeBoy extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukeFleija.java b/com/hbm/blocks/NukeFleija.java index aeda84e34..ec15513f9 100644 --- a/com/hbm/blocks/NukeFleija.java +++ b/com/hbm/blocks/NukeFleija.java @@ -5,7 +5,6 @@ import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -39,11 +38,13 @@ public class NukeFleija extends BlockContainer { return new TileEntityNukeFleija(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_fleija); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -72,7 +73,7 @@ public class NukeFleija extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -80,9 +81,9 @@ public class NukeFleija extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -95,6 +96,7 @@ public class NukeFleija extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -112,7 +114,8 @@ public class NukeFleija extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeFleija entity = (TileEntityNukeFleija) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -150,20 +153,24 @@ public class NukeFleija extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukeGadget.java b/com/hbm/blocks/NukeGadget.java index 8391253a2..c46fb681b 100644 --- a/com/hbm/blocks/NukeGadget.java +++ b/com/hbm/blocks/NukeGadget.java @@ -1,39 +1,26 @@ package com.hbm.blocks; import java.util.HashMap; -import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosion; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; -import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentProtection; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class NukeGadget extends BlockContainer { @@ -54,11 +41,13 @@ public class NukeGadget extends BlockContainer { } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_gadget); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -87,7 +76,7 @@ public class NukeGadget extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -95,9 +84,9 @@ public class NukeGadget extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -110,6 +99,7 @@ public class NukeGadget extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -127,7 +117,8 @@ public class NukeGadget extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeGadget entity = (TileEntityNukeGadget) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -376,20 +367,24 @@ public class NukeGadget extends BlockContainer { } }*/ + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukeMan.java b/com/hbm/blocks/NukeMan.java index 7948f9e8d..5fec1f310 100644 --- a/com/hbm/blocks/NukeMan.java +++ b/com/hbm/blocks/NukeMan.java @@ -1,39 +1,26 @@ package com.hbm.blocks; import java.util.HashMap; -import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosion; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; -import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentProtection; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class NukeMan extends BlockContainer { @@ -53,11 +40,13 @@ public class NukeMan extends BlockContainer { } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_man); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -86,7 +75,7 @@ public class NukeMan extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -94,9 +83,9 @@ public class NukeMan extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -109,6 +98,7 @@ public class NukeMan extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -126,7 +116,8 @@ public class NukeMan extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeMan entity = (TileEntityNukeMan) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -375,20 +366,24 @@ public class NukeMan extends BlockContainer { } }*/ + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukeMike.java b/com/hbm/blocks/NukeMike.java index 8be2b5f3e..9ea54ba1a 100644 --- a/com/hbm/blocks/NukeMike.java +++ b/com/hbm/blocks/NukeMike.java @@ -5,7 +5,6 @@ import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -39,11 +38,13 @@ public class NukeMike extends BlockContainer { return new TileEntityNukeMike(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_mike); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -72,7 +73,7 @@ public class NukeMike extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -80,9 +81,9 @@ public class NukeMike extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -95,6 +96,7 @@ public class NukeMike extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -112,7 +114,8 @@ public class NukeMike extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeMike entity = (TileEntityNukeMike) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -159,20 +162,24 @@ public class NukeMike extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukePrototype.java b/com/hbm/blocks/NukePrototype.java index eee39d72c..e9175e809 100644 --- a/com/hbm/blocks/NukePrototype.java +++ b/com/hbm/blocks/NukePrototype.java @@ -1,7 +1,6 @@ package com.hbm.blocks; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Random; @@ -40,11 +39,13 @@ public class NukePrototype extends BlockContainer { return new TileEntityNukePrototype(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_prototype); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -73,7 +74,7 @@ public class NukePrototype extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -81,9 +82,9 @@ public class NukePrototype extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -96,6 +97,7 @@ public class NukePrototype extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -123,7 +125,8 @@ public class NukePrototype extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukePrototype entity = (TileEntityNukePrototype) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -161,20 +164,24 @@ public class NukePrototype extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/NukeTsar.java b/com/hbm/blocks/NukeTsar.java index 8e4e4e25e..d2cc252e8 100644 --- a/com/hbm/blocks/NukeTsar.java +++ b/com/hbm/blocks/NukeTsar.java @@ -5,7 +5,6 @@ import java.util.Map; import java.util.Random; import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.explosion.ExplosionNukeAdvanced; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -39,11 +38,13 @@ public class NukeTsar extends BlockContainer { return new TileEntityNukeTsar(); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.nuke_tsar); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -72,7 +73,7 @@ public class NukeTsar extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -80,9 +81,9 @@ public class NukeTsar extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -95,6 +96,7 @@ public class NukeTsar extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -112,7 +114,8 @@ public class NukeTsar extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityNukeTsar entity = (TileEntityNukeTsar) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -159,20 +162,24 @@ public class NukeTsar extends BlockContainer { return false; } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/RedBarrel.java b/com/hbm/blocks/RedBarrel.java index 9916d1c58..c4b6e1207 100644 --- a/com/hbm/blocks/RedBarrel.java +++ b/com/hbm/blocks/RedBarrel.java @@ -21,7 +21,8 @@ public class RedBarrel extends BlockContainer { super(p_i45394_1_); } - public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) + @Override + public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) { if (!p_149723_1_.isRemote) { @@ -29,6 +30,7 @@ public class RedBarrel extends BlockContainer { } } + @Override public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { if (p_149695_1_.getBlock(x + 1, y, z) == Blocks.fire || p_149695_1_.getBlock(x - 1, y, z) == Blocks.fire || p_149695_1_.getBlock(x, y + 1, z) == Blocks.fire || p_149695_1_.getBlock(x, y - 1, z) == Blocks.fire || p_149695_1_.getBlock(x, y, z + 1) == Blocks.fire || p_149695_1_.getBlock(x, y, z - 1) == Blocks.fire) @@ -39,38 +41,45 @@ public class RedBarrel extends BlockContainer { public void explode(World p_149695_1_, int x, int y, int z) { - p_149695_1_.newExplosion((Entity)null, (double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), 2.5F, true, true); + p_149695_1_.newExplosion((Entity)null, x + 0.5F, y + 0.5F, z + 0.5F, 2.5F, true, true); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityRedBarrel(); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":red_barrel"); } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; this.setBlockBounds(2*f, 0.0F, 2*f, 14*f, 1.0F, 14*f); } - public boolean canDropFromExplosion(Explosion p_149659_1_) + @Override + public boolean canDropFromExplosion(Explosion p_149659_1_) { return false; } diff --git a/com/hbm/blocks/ReinforcedBlock.java b/com/hbm/blocks/ReinforcedBlock.java index 6402a3df6..e2ebff5cf 100644 --- a/com/hbm/blocks/ReinforcedBlock.java +++ b/com/hbm/blocks/ReinforcedBlock.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; import net.minecraft.util.Facing; import net.minecraft.world.IBlockAccess; @@ -16,12 +15,14 @@ public class ReinforcedBlock extends Block { super(p_i45394_1_); } - public boolean isOpaqueCube() + @Override + public boolean isOpaqueCube() { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) { Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_); diff --git a/com/hbm/blocks/ReinforcedLamp.java b/com/hbm/blocks/ReinforcedLamp.java index 7313c8301..d6e642942 100644 --- a/com/hbm/blocks/ReinforcedLamp.java +++ b/com/hbm/blocks/ReinforcedLamp.java @@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -27,7 +26,8 @@ public class ReinforcedLamp extends Block { } } - public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) + @Override + public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) { if (!p_149726_1_.isRemote) { @@ -42,7 +42,8 @@ public class ReinforcedLamp extends Block { } } - public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { if (!p_149695_1_.isRemote) { @@ -57,7 +58,8 @@ public class ReinforcedLamp extends Block { } } - public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) + @Override + public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { if (!p_149674_1_.isRemote && this.field_150171_a && !p_149674_1_.isBlockIndirectlyGettingPowered(p_149674_2_, p_149674_3_, p_149674_4_)) { @@ -65,18 +67,21 @@ public class ReinforcedLamp extends Block { } } - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.reinforced_lamp_off); } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return Item.getItemFromBlock(ModBlocks.reinforced_lamp_off); } - protected ItemStack createStackedBlock(int p_149644_1_) + @Override + protected ItemStack createStackedBlock(int p_149644_1_) { return new ItemStack(ModBlocks.reinforced_lamp_off); } diff --git a/com/hbm/blocks/TestBomb.java b/com/hbm/blocks/TestBomb.java index b01b19189..e597a6596 100644 --- a/com/hbm/blocks/TestBomb.java +++ b/com/hbm/blocks/TestBomb.java @@ -2,11 +2,7 @@ package com.hbm.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.ChatComponentText; -import net.minecraft.world.Explosion; import net.minecraft.world.World; public class TestBomb extends Block { @@ -20,6 +16,7 @@ public class TestBomb extends Block { super(p_i45394_1_); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); @@ -36,7 +33,8 @@ public class TestBomb extends Block { * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are * their own) Args: x, y, z, neighbor Block */ - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) { diff --git a/com/hbm/blocks/TestBombAdvanced.java b/com/hbm/blocks/TestBombAdvanced.java index c919aad96..340846ca0 100644 --- a/com/hbm/blocks/TestBombAdvanced.java +++ b/com/hbm/blocks/TestBombAdvanced.java @@ -32,39 +32,46 @@ public class TestBombAdvanced extends BlockContainer { } //Nicht verfügbarer Rendertyp, setzt den Switch auf "Default" und ermöglicht einen Customrenderer + @Override public int getRenderType(){ return -1; } //Ob der Block transparent ist (Glas, Glowstone, Wasser, etc) + @Override public boolean isOpaqueCube() { return false; } //"Default" beim Switch zum Rendern ermöglicht die Abfrage "renderAsNormalBlock", "true" um es als einen normalen Block rendern zu lassen, "false" für einen Customrenderer + @Override public boolean renderAsNormalBlock() { return false; } //Erstellen eines TileEntitys + @Override public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityTestBombAdvanced(); } //GUI Blocktextur muss für Custommodel-Blocke nachträglich geändert werden + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render"); } //Setzt die Blockkollisionsbox (xMin, yMin, zMin, xMax, yMax, zMax) + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; this.setBlockBounds(4*f, 0.0F, 0.0F, 12*f, 8*f, 1.0F); } + @Override public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); @@ -77,7 +84,8 @@ public class TestBombAdvanced extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) { diff --git a/com/hbm/blocks/TestContainer.java b/com/hbm/blocks/TestContainer.java index b6e7824f9..22334953f 100644 --- a/com/hbm/blocks/TestContainer.java +++ b/com/hbm/blocks/TestContainer.java @@ -11,7 +11,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; -import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -35,6 +34,7 @@ public class TestContainer extends BlockChest { private final Random field_149955_b = new Random(); //Aktiviert durch: Platzieren. Bewirkt: Rotation des Blockes in Blickrichtung + @Override public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) { Block block = p_149689_1_.getBlock(p_149689_2_, p_149689_3_, p_149689_4_ - 1); @@ -42,7 +42,7 @@ public class TestContainer extends BlockChest { Block block2 = p_149689_1_.getBlock(p_149689_2_ - 1, p_149689_3_, p_149689_4_); Block block3 = p_149689_1_.getBlock(p_149689_2_ + 1, p_149689_3_, p_149689_4_); byte b0 = 0; - int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int l = MathHelper.floor_double(p_149689_5_.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if (l == 0) { @@ -106,6 +106,7 @@ public class TestContainer extends BlockChest { } //Aktiviert durch: Blockupdate. Bewirkt: Verbinden zweier Kisten + @Override public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { super.onNeighborBlockChange(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_); @@ -118,6 +119,7 @@ public class TestContainer extends BlockChest { } //Aktiviert durch: Zerstörung. Bewirkt: Droppt alle in ihm befindlichen Items + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { TileEntityTestContainer tileentitychest = (TileEntityTestContainer)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); @@ -144,11 +146,11 @@ public class TestContainer extends BlockChest { } itemstack.stackSize -= j1; - entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149955_b.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149955_b.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149955_b.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149955_b.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149955_b.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149955_b.nextGaussian() * f3; if (itemstack.hasTagCompound()) { @@ -165,9 +167,10 @@ public class TestContainer extends BlockChest { } //Allgemeine Inventarfunktion + @Override public IInventory func_149951_m(World p_149951_1_, int p_149951_2_, int p_149951_3_, int p_149951_4_) { - Object object = (TileEntityTestContainer)p_149951_1_.getTileEntity(p_149951_2_, p_149951_3_, p_149951_4_); + Object object = p_149951_1_.getTileEntity(p_149951_2_, p_149951_3_, p_149951_4_); if (object == null) { @@ -226,7 +229,7 @@ public class TestContainer extends BlockChest { //Bewirkt, dass sich Katzen draufsetzen private static boolean func_149953_o(World p_149953_0_, int p_149953_1_, int p_149953_2_, int p_149953_3_) { - Iterator iterator = p_149953_0_.getEntitiesWithinAABB(EntityOcelot.class, AxisAlignedBB.getBoundingBox((double)p_149953_1_, (double)(p_149953_2_ + 1), (double)p_149953_3_, (double)(p_149953_1_ + 1), (double)(p_149953_2_ + 2), (double)(p_149953_3_ + 1))).iterator(); + Iterator iterator = p_149953_0_.getEntitiesWithinAABB(EntityOcelot.class, AxisAlignedBB.getBoundingBox(p_149953_1_, p_149953_2_ + 1, p_149953_3_, p_149953_1_ + 1, p_149953_2_ + 2, p_149953_3_ + 1)).iterator(); EntityOcelot entityocelot; do @@ -245,6 +248,7 @@ public class TestContainer extends BlockChest { } //Erzeugt ein neues Tileentity + @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { TileEntityTestContainer tileentitychest = new TileEntityTestContainer(); @@ -252,6 +256,7 @@ public class TestContainer extends BlockChest { } //Registriert das Inventaricon + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister p_149651_1_) { diff --git a/com/hbm/blocks/TestEventTester.java b/com/hbm/blocks/TestEventTester.java index c086357aa..05b459a9e 100644 --- a/com/hbm/blocks/TestEventTester.java +++ b/com/hbm/blocks/TestEventTester.java @@ -6,32 +6,15 @@ import java.util.List; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.entity.EntityNukeExplosion; -import com.hbm.entity.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionChaos; -import com.hbm.explosion.ExplosionNukeAdvanced; -import com.hbm.main.MainRegistry; -import com.hbm.particles.NukeCloudFX; -import com.hbm.particles.NukeSmokeFX; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntitySmokeFX; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; public class TestEventTester extends Block { @@ -44,7 +27,8 @@ public class TestEventTester extends Block { protected static Random itemRand = new Random(); public World worldObj; - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { this.worldObj = p_149695_1_; if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -83,7 +67,8 @@ public class TestEventTester extends Block { } }*/ - public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + @Override + public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { /*double d = (float)par2 + 0.5F; double d1 = (float)par3 + 0.7F; @@ -133,7 +118,7 @@ public class TestEventTester extends Block { public void killEvent(World world, int x, int y, int z) { - world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "random.break", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.break", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); float f = this.explosionSize; HashSet hashset = new HashSet(); int i; @@ -152,28 +137,28 @@ public class TestEventTester extends Block { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); Vec3 vec4 = Vec3.createVectorHelper(x, y + 1, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)this.explosionSize; + double d4 = entity.getDistance(x, y, z) / this.explosionSize; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { d5 /= d9; d6 /= d9; d7 /= d9; - double d10 = (double)world.getBlockDensity(vec4, entity.boundingBox); + double d10 = world.getBlockDensity(vec4, entity.boundingBox); double d11 = (1.0D - d4) * d10; //entity.attackEntityFrom(DamageSource.generic, (float)(100 - d9/wat*100/d10)); @@ -191,7 +176,7 @@ public class TestEventTester extends Block { if (entity instanceof EntityPlayer) { - this.field_77288_k.put((EntityPlayer)entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); + this.field_77288_k.put(entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); } } } diff --git a/com/hbm/blocks/TestMissile.java b/com/hbm/blocks/TestMissile.java index 9c2113d5c..c74643241 100644 --- a/com/hbm/blocks/TestMissile.java +++ b/com/hbm/blocks/TestMissile.java @@ -1,12 +1,8 @@ package com.hbm.blocks; import com.hbm.entity.EntityTestMissile; -import com.hbm.main.MainRegistry; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class TestMissile extends Block { @@ -15,7 +11,8 @@ public class TestMissile extends Block { super(p_i45394_1_); } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityTestNuke entity = (TileEntityTestNuke) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) diff --git a/com/hbm/blocks/TestNuke.java b/com/hbm/blocks/TestNuke.java index fdb773a88..8f858e415 100644 --- a/com/hbm/blocks/TestNuke.java +++ b/com/hbm/blocks/TestNuke.java @@ -9,15 +9,12 @@ import java.util.Random; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; @@ -51,11 +48,13 @@ public class TestNuke extends BlockContainer { } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(ModBlocks.test_nuke); } + @Override public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { if (!keepInventory) @@ -84,7 +83,7 @@ public class TestNuke extends BlockContainer { } itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, (double)((float)p_149749_2_ + f), (double)((float)p_149749_3_ + f1), (double)((float)p_149749_4_ + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); if (itemstack.hasTagCompound()) { @@ -92,9 +91,9 @@ public class TestNuke extends BlockContainer { } float f3 = 0.05F; - entityitem.motionX = (double)((float)this.field_149933_a.nextGaussian() * f3); - entityitem.motionY = (double)((float)this.field_149933_a.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double)((float)this.field_149933_a.nextGaussian() * f3); + entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; p_149749_1_.spawnEntityInWorld(entityitem); } } @@ -107,6 +106,7 @@ public class TestNuke extends BlockContainer { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { @@ -124,7 +124,8 @@ public class TestNuke extends BlockContainer { } } - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { TileEntityTestNuke entity = (TileEntityTestNuke) p_149695_1_.getTileEntity(x, y, z); if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) @@ -203,29 +204,29 @@ public class TestNuke extends BlockContainer { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength; + double d4 = entity.getDistance(x, y, z) / bombStartStrength; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { d5 /= d9; d6 /= d9; d7 /= d9; - double d10 = (double)world.getBlockDensity(vec3, entity.boundingBox); + double d10 = world.getBlockDensity(vec3, entity.boundingBox); double d11 = (1.0D - d4);// * d10; - entity.attackEntityFrom(DamageSource.generic, (float)((int)((d11 * d11 + d11) / 2.0D * 8.0D * (double)bombStartStrength + 1.0D))); + entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D))); double d8 = EnchantmentProtection.func_92092_a(entity, d11); entity.motionX += d5 * d8; entity.motionY += d6 * d8; @@ -233,7 +234,7 @@ public class TestNuke extends BlockContainer { if (entity instanceof EntityPlayer) { - this.field_77288_k.put((EntityPlayer)entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); + this.field_77288_k.put(entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); } } } diff --git a/com/hbm/blocks/TestObjTester.java b/com/hbm/blocks/TestObjTester.java index 1d09d2049..c59fb3370 100644 --- a/com/hbm/blocks/TestObjTester.java +++ b/com/hbm/blocks/TestObjTester.java @@ -11,7 +11,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class TestObjTester extends BlockContainer{ @@ -20,23 +19,28 @@ public class TestObjTester extends BlockContainer{ super(p_i45394_1_); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityObjTester(); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render"); @@ -48,8 +52,9 @@ public class TestObjTester extends BlockContainer{ this.setBlockBounds(2*f, 0.0F, 2*f, 14*f, 1.0F, 14*f); }*/ + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/TestRender.java b/com/hbm/blocks/TestRender.java index c7f272243..089c966fc 100644 --- a/com/hbm/blocks/TestRender.java +++ b/com/hbm/blocks/TestRender.java @@ -3,7 +3,6 @@ package com.hbm.blocks; import com.hbm.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -25,33 +24,39 @@ public class TestRender extends BlockContainer { } //Nicht verfügbarer Rendertyp, setzt den Switch auf "Default" und ermöglicht einen Customrenderer + @Override public int getRenderType(){ return -1; } //Ob der Block transparent ist (Glas, Glowstone, Wasser, etc) + @Override public boolean isOpaqueCube() { return false; } //"Default" beim Switch zum Rendern ermöglicht die Abfrage "renderAsNormalBlock", "true" um es als einen normalen Block rendern zu lassen, "false" für einen Customrenderer + @Override public boolean renderAsNormalBlock() { return false; } //Erstellen eines TileEntitys + @Override public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityTestRender(); } //GUI Blocktextur muss für Custommodel-Blocke nachträglich geändert werden + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render"); } //Setzt die Blockkollisionsbox (xMin, yMin, zMin, xMax, yMax, zMax) + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; diff --git a/com/hbm/blocks/TestRotationTester.java b/com/hbm/blocks/TestRotationTester.java index 4a5adeb6b..d21076aad 100644 --- a/com/hbm/blocks/TestRotationTester.java +++ b/com/hbm/blocks/TestRotationTester.java @@ -11,7 +11,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class TestRotationTester extends BlockContainer { @@ -20,30 +19,36 @@ public class TestRotationTester extends BlockContainer { super(p_i45394_1_); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityRotationTester(); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render"); } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) { diff --git a/com/hbm/blocks/TestTicker.java b/com/hbm/blocks/TestTicker.java index ada214f38..b0bc62bb9 100644 --- a/com/hbm/blocks/TestTicker.java +++ b/com/hbm/blocks/TestTicker.java @@ -2,12 +2,8 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.particles.NukeSmokeFX; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class TestTicker extends Block { @@ -17,7 +13,8 @@ public class TestTicker extends Block { this.setTickRandomly(true); } - public void updateTick(World world, int x, int y, int z, Random rand) { + @Override + public void updateTick(World world, int x, int y, int z, Random rand) { { if(world.getBlock(x + 1, y, z) != ModBlocks.test_ticker) { diff --git a/com/hbm/blocks/TileEntityBombMulti.java b/com/hbm/blocks/TileEntityBombMulti.java index 9e47e8b67..af4fefff3 100644 --- a/com/hbm/blocks/TileEntityBombMulti.java +++ b/com/hbm/blocks/TileEntityBombMulti.java @@ -100,7 +100,7 @@ public class TileEntityBombMulti extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -134,6 +134,7 @@ public class TileEntityBombMulti extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -141,7 +142,7 @@ public class TileEntityBombMulti extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -150,6 +151,7 @@ public class TileEntityBombMulti extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -263,6 +265,6 @@ public class TileEntityBombMulti extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } \ No newline at end of file diff --git a/com/hbm/blocks/TileEntityDecoBlock.java b/com/hbm/blocks/TileEntityDecoBlock.java index 6e69eebbd..1c3551230 100644 --- a/com/hbm/blocks/TileEntityDecoBlock.java +++ b/com/hbm/blocks/TileEntityDecoBlock.java @@ -7,7 +7,7 @@ public class TileEntityDecoBlock extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityDecoBlockAlt.java b/com/hbm/blocks/TileEntityDecoBlockAlt.java index c97784cd8..f2be5a9c8 100644 --- a/com/hbm/blocks/TileEntityDecoBlockAlt.java +++ b/com/hbm/blocks/TileEntityDecoBlockAlt.java @@ -7,7 +7,7 @@ public class TileEntityDecoBlockAlt extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityDecoBlockAltF.java b/com/hbm/blocks/TileEntityDecoBlockAltF.java index 7b4fd5fb2..0f8c6cb60 100644 --- a/com/hbm/blocks/TileEntityDecoBlockAltF.java +++ b/com/hbm/blocks/TileEntityDecoBlockAltF.java @@ -3,12 +3,7 @@ package com.hbm.blocks; import java.util.HashSet; import java.util.List; -import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.lib.Library; - import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -19,6 +14,7 @@ import net.minecraft.util.Vec3; public class TileEntityDecoBlockAltF extends TileEntity { + @Override public void updateEntity() { int strength = 4; float f = strength; @@ -40,20 +36,20 @@ public class TileEntityDecoBlockAltF extends TileEntity { int i2 = MathHelper.floor_double(this.yCoord + wat + 1.0D); int l = MathHelper.floor_double(this.zCoord - wat - 1.0D); int j2 = MathHelper.floor_double(this.zCoord + wat + 1.0D); - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(this.xCoord, this.yCoord, this.zCoord); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(this.xCoord, this.yCoord, this.zCoord) / (double)4; + double d4 = entity.getDistance(this.xCoord, this.yCoord, this.zCoord) / 4; if (d4 <= 1.0D) { d5 = entity.posX - this.xCoord; - d6 = entity.posY + (double)entity.getEyeHeight() - this.yCoord; + d6 = entity.posY + entity.getEyeHeight() - this.yCoord; d7 = entity.posZ - this.zCoord; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { if(entity instanceof EntityPlayer) { @@ -69,6 +65,6 @@ public class TileEntityDecoBlockAltF extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityDecoBlockAltG.java b/com/hbm/blocks/TileEntityDecoBlockAltG.java index ac98aec71..0041ae5f1 100644 --- a/com/hbm/blocks/TileEntityDecoBlockAltG.java +++ b/com/hbm/blocks/TileEntityDecoBlockAltG.java @@ -7,7 +7,7 @@ public class TileEntityDecoBlockAltG extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityDecoBlockAltW.java b/com/hbm/blocks/TileEntityDecoBlockAltW.java index cc445512c..70b570024 100644 --- a/com/hbm/blocks/TileEntityDecoBlockAltW.java +++ b/com/hbm/blocks/TileEntityDecoBlockAltW.java @@ -7,7 +7,7 @@ public class TileEntityDecoBlockAltW extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityDiFurnace.java b/com/hbm/blocks/TileEntityDiFurnace.java index 50b75f9bd..02ab89e7e 100644 --- a/com/hbm/blocks/TileEntityDiFurnace.java +++ b/com/hbm/blocks/TileEntityDiFurnace.java @@ -3,11 +3,9 @@ package com.hbm.blocks; import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; -import net.minecraft.block.BlockFurnace; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -91,12 +89,14 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -128,6 +128,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { } } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -149,6 +150,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -160,7 +162,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -169,6 +171,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) dualPower); @@ -275,6 +278,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { return this.dualCookTime > 0; } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -298,7 +302,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { //if(!worldObj.isRemote) { - if(this.hasItemPower(this.slots[2]) && this.dualPower <= (this.maxPower - this.getItemPower(this.slots[2]))) + if(this.hasItemPower(this.slots[2]) && this.dualPower <= (TileEntityDiFurnace.maxPower - TileEntityDiFurnace.getItemPower(this.slots[2]))) { this.dualPower += getItemPower(this.slots[2]); if(this.slots[2] != null) @@ -327,7 +331,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { { dualCookTime++; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityDiFurnace.processingSpeed) { this.dualCookTime = 0; this.processItem(); diff --git a/com/hbm/blocks/TileEntityLaunchPad.java b/com/hbm/blocks/TileEntityLaunchPad.java index bb85088ca..bc82d1de3 100644 --- a/com/hbm/blocks/TileEntityLaunchPad.java +++ b/com/hbm/blocks/TileEntityLaunchPad.java @@ -91,12 +91,14 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -104,6 +106,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { return true; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -125,6 +128,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -134,7 +138,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -143,6 +147,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -182,6 +187,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { return (power * i) / maxPower; } + @Override public void updateEntity() { if(/*power + 100 <= maxPower && */slots[2] != null && slots[2].getItem() == ModItems.battery_creative) @@ -405,7 +411,7 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } public World getThatWorld() { diff --git a/com/hbm/blocks/TileEntityMachineBattery.java b/com/hbm/blocks/TileEntityMachineBattery.java index 73689b47e..8db59eb14 100644 --- a/com/hbm/blocks/TileEntityMachineBattery.java +++ b/com/hbm/blocks/TileEntityMachineBattery.java @@ -1,13 +1,10 @@ package com.hbm.blocks; -import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -88,11 +85,13 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -100,6 +99,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent return true; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -121,6 +121,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -130,7 +131,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -139,6 +140,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("power", (short) power); @@ -177,6 +179,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent return (power * i) / maxPower; } + @Override public void updateEntity() { if(this.conducts) { @@ -430,17 +433,17 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent entity instanceof TileEntityMachineBattery || entity instanceof TileEntityLaunchPad) { - if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower) + if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower) { ((TileEntityMachineElectricFurnace)entity).power += 100; this.power -= 100; } else - if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower) + if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower) { - ((TileEntityWireCoated)entity).power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } else - if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower) + if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower) { ((TileEntityMachineDeuterium)entity).power += 100; this.power -= 100; diff --git a/com/hbm/blocks/TileEntityMachineCentrifuge.java b/com/hbm/blocks/TileEntityMachineCentrifuge.java index f61a5e8bb..0211d12ce 100644 --- a/com/hbm/blocks/TileEntityMachineCentrifuge.java +++ b/com/hbm/blocks/TileEntityMachineCentrifuge.java @@ -3,11 +3,9 @@ package com.hbm.blocks; import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; -import net.minecraft.block.BlockFurnace; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -92,12 +90,14 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -129,6 +129,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv } } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -150,6 +151,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -161,7 +163,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -170,6 +172,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) dualPower); @@ -330,6 +333,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv return this.dualCookTime > 0; } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -353,7 +357,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv if(!worldObj.isRemote) { - if(this.hasItemPower(this.slots[1]) && this.dualPower <= (this.maxPower - this.getItemPower(this.slots[1]))) + if(this.hasItemPower(this.slots[1]) && this.dualPower <= (TileEntityMachineCentrifuge.maxPower - TileEntityMachineCentrifuge.getItemPower(this.slots[1]))) { this.dualPower += getItemPower(this.slots[1]); if(this.slots[1] != null) @@ -382,7 +386,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv { dualCookTime++; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityMachineCentrifuge.processingSpeed) { this.dualCookTime = 0; this.processItem(); @@ -412,6 +416,6 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityMachineCoal.java b/com/hbm/blocks/TileEntityMachineCoal.java index e24d31efe..8d59039b6 100644 --- a/com/hbm/blocks/TileEntityMachineCoal.java +++ b/com/hbm/blocks/TileEntityMachineCoal.java @@ -6,7 +6,6 @@ import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; @@ -89,12 +88,14 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -102,6 +103,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory return true; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -123,6 +125,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -133,7 +136,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -142,6 +145,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) power); @@ -185,6 +189,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory return (power * i) / maxPower; } + @Override public void updateEntity() { //Water if(slots[0] != null && slots[0].getItem() == Items.water_bucket && this.water + 2500 <= maxWater) @@ -245,7 +250,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -254,7 +259,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -263,7 +268,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -272,7 +277,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -281,7 +286,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -290,7 +295,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineElectricFurnace) { TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -301,54 +306,54 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof WireCoated) { TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0) { - entity.power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } } @@ -357,7 +362,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -366,7 +371,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -375,7 +380,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -384,7 +389,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -393,7 +398,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; @@ -402,7 +407,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineDeuterium) { TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); - if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0) + if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0) { entity.power += 100; this.power -= 100; diff --git a/com/hbm/blocks/TileEntityMachineDeuterium.java b/com/hbm/blocks/TileEntityMachineDeuterium.java index 95b936a3d..f7993e3f2 100644 --- a/com/hbm/blocks/TileEntityMachineDeuterium.java +++ b/com/hbm/blocks/TileEntityMachineDeuterium.java @@ -88,11 +88,13 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -100,6 +102,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve return false; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -121,6 +124,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -133,7 +137,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -142,6 +146,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("power", (short) power); @@ -235,6 +240,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve } } + @Override public void updateEntity() { if(slots[2] != null && slots[2].getItem() == ModItems.sulfur && sulfur + 125 <= maxFill) { diff --git a/com/hbm/blocks/TileEntityMachineElectricFurnace.java b/com/hbm/blocks/TileEntityMachineElectricFurnace.java index 58d285a6d..06e9b3700 100644 --- a/com/hbm/blocks/TileEntityMachineElectricFurnace.java +++ b/com/hbm/blocks/TileEntityMachineElectricFurnace.java @@ -1,13 +1,10 @@ package com.hbm.blocks; -import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; @@ -89,12 +86,14 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -102,6 +101,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid return true; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -123,6 +123,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -133,7 +134,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -142,6 +143,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) power); @@ -251,6 +253,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid } } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -263,7 +266,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid power -= 5; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityMachineElectricFurnace.processingSpeed) { this.dualCookTime = 0; this.processItem(); diff --git a/com/hbm/blocks/TileEntityMachineGenerator.java b/com/hbm/blocks/TileEntityMachineGenerator.java index f8a45a5de..9f22a2534 100644 --- a/com/hbm/blocks/TileEntityMachineGenerator.java +++ b/com/hbm/blocks/TileEntityMachineGenerator.java @@ -9,7 +9,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; @@ -93,12 +92,14 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -106,6 +107,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve return true; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -127,6 +129,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +142,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +151,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("water", (short) water); @@ -218,6 +222,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve return heat > 0; } + @Override public void updateEntity() { if(!worldObj.isRemote) @@ -735,17 +740,17 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve entity instanceof TileEntityMachineBattery || entity instanceof TileEntityLaunchPad) { - if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower) + if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower) { ((TileEntityMachineElectricFurnace)entity).power += 100; this.power -= 100; } else - if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower) + if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower) { - ((TileEntityWireCoated)entity).power += 100; + TileEntityWireCoated.power += 100; this.power -= 100; } else - if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower) + if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower) { ((TileEntityMachineDeuterium)entity).power += 100; this.power -= 100; diff --git a/com/hbm/blocks/TileEntityMachinePuF6Tank.java b/com/hbm/blocks/TileEntityMachinePuF6Tank.java index 39139d1d8..c561c5381 100644 --- a/com/hbm/blocks/TileEntityMachinePuF6Tank.java +++ b/com/hbm/blocks/TileEntityMachinePuF6Tank.java @@ -3,10 +3,8 @@ package com.hbm.blocks; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -86,11 +84,13 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -98,6 +98,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven return false; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -119,6 +120,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -128,7 +130,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -137,6 +139,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("fillState", (short) fillState); @@ -205,6 +208,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven return false; } + @Override public void updateEntity() { if(!worldObj.isRemote) @@ -253,6 +257,6 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityMachineReactor.java b/com/hbm/blocks/TileEntityMachineReactor.java index 755d52050..d4a920871 100644 --- a/com/hbm/blocks/TileEntityMachineReactor.java +++ b/com/hbm/blocks/TileEntityMachineReactor.java @@ -3,11 +3,8 @@ package com.hbm.blocks; import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; -import net.minecraft.block.BlockFurnace; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -91,12 +88,14 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -141,6 +140,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent } } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -162,6 +162,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -173,7 +174,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -182,6 +183,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) dualPower); @@ -293,6 +295,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent return this.dualCookTime > 0; } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -330,7 +333,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent { dualCookTime++; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityMachineReactor.processingSpeed) { this.dualCookTime = 0; this.processItem(); diff --git a/com/hbm/blocks/TileEntityMachineUF6Tank.java b/com/hbm/blocks/TileEntityMachineUF6Tank.java index 305b8ab25..f51dd5f24 100644 --- a/com/hbm/blocks/TileEntityMachineUF6Tank.java +++ b/com/hbm/blocks/TileEntityMachineUF6Tank.java @@ -3,10 +3,8 @@ package com.hbm.blocks; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -86,11 +84,13 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -98,6 +98,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent return false; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -119,6 +120,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -128,7 +130,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -137,6 +139,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("fillState", (short) fillState); @@ -205,6 +208,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent return false; } + @Override public void updateEntity() { if(!worldObj.isRemote) @@ -253,6 +257,6 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeBoy.java b/com/hbm/blocks/TileEntityNukeBoy.java index 1cad9efaa..255d89333 100644 --- a/com/hbm/blocks/TileEntityNukeBoy.java +++ b/com/hbm/blocks/TileEntityNukeBoy.java @@ -98,7 +98,7 @@ public class TileEntityNukeBoy extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -132,6 +132,7 @@ public class TileEntityNukeBoy extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +140,7 @@ public class TileEntityNukeBoy extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +149,7 @@ public class TileEntityNukeBoy extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -186,6 +188,6 @@ public class TileEntityNukeBoy extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeFleija.java b/com/hbm/blocks/TileEntityNukeFleija.java index ed50311fe..0d1e1a312 100644 --- a/com/hbm/blocks/TileEntityNukeFleija.java +++ b/com/hbm/blocks/TileEntityNukeFleija.java @@ -98,7 +98,7 @@ public class TileEntityNukeFleija extends TileEntity implements ISidedInventory { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -132,6 +132,7 @@ public class TileEntityNukeFleija extends TileEntity implements ISidedInventory return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +140,7 @@ public class TileEntityNukeFleija extends TileEntity implements ISidedInventory for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +149,7 @@ public class TileEntityNukeFleija extends TileEntity implements ISidedInventory } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -195,7 +197,7 @@ public class TileEntityNukeFleija extends TileEntity implements ISidedInventory @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeFurnace.java b/com/hbm/blocks/TileEntityNukeFurnace.java index 24803f237..2f7f23469 100644 --- a/com/hbm/blocks/TileEntityNukeFurnace.java +++ b/com/hbm/blocks/TileEntityNukeFurnace.java @@ -1,11 +1,8 @@ package com.hbm.blocks; -import com.hbm.gui.MachineRecipes; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -89,12 +86,14 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -139,6 +138,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory } } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -160,6 +160,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -170,7 +171,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -179,6 +180,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("powerTime", (short) dualPower); @@ -290,6 +292,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory return this.dualCookTime > 0; } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -314,7 +317,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory { dualCookTime++; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityNukeFurnace.processingSpeed) { this.dualCookTime = 0; this.processItem(); diff --git a/com/hbm/blocks/TileEntityNukeGadget.java b/com/hbm/blocks/TileEntityNukeGadget.java index fec1c5ab8..874930a83 100644 --- a/com/hbm/blocks/TileEntityNukeGadget.java +++ b/com/hbm/blocks/TileEntityNukeGadget.java @@ -3,10 +3,8 @@ package com.hbm.blocks; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -100,7 +98,7 @@ public class TileEntityNukeGadget extends TileEntity implements ISidedInventory { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -134,6 +132,7 @@ public class TileEntityNukeGadget extends TileEntity implements ISidedInventory return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -141,7 +140,7 @@ public class TileEntityNukeGadget extends TileEntity implements ISidedInventory for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -150,6 +149,7 @@ public class TileEntityNukeGadget extends TileEntity implements ISidedInventory } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -250,6 +250,6 @@ public class TileEntityNukeGadget extends TileEntity implements ISidedInventory @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeMan.java b/com/hbm/blocks/TileEntityNukeMan.java index 971e59956..78dc1cb03 100644 --- a/com/hbm/blocks/TileEntityNukeMan.java +++ b/com/hbm/blocks/TileEntityNukeMan.java @@ -3,10 +3,8 @@ package com.hbm.blocks; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -100,7 +98,7 @@ public class TileEntityNukeMan extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -134,6 +132,7 @@ public class TileEntityNukeMan extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -141,7 +140,7 @@ public class TileEntityNukeMan extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -150,6 +149,7 @@ public class TileEntityNukeMan extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -224,6 +224,6 @@ public class TileEntityNukeMan extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeMike.java b/com/hbm/blocks/TileEntityNukeMike.java index c05114825..d798f29b7 100644 --- a/com/hbm/blocks/TileEntityNukeMike.java +++ b/com/hbm/blocks/TileEntityNukeMike.java @@ -98,7 +98,7 @@ public class TileEntityNukeMike extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -132,6 +132,7 @@ public class TileEntityNukeMike extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +140,7 @@ public class TileEntityNukeMike extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +149,7 @@ public class TileEntityNukeMike extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -207,7 +209,7 @@ public class TileEntityNukeMike extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukePrototype.java b/com/hbm/blocks/TileEntityNukePrototype.java index 200cb4f55..b48c21c6f 100644 --- a/com/hbm/blocks/TileEntityNukePrototype.java +++ b/com/hbm/blocks/TileEntityNukePrototype.java @@ -98,7 +98,7 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -132,6 +132,7 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +140,7 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +149,7 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -198,6 +200,6 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityNukeTsar.java b/com/hbm/blocks/TileEntityNukeTsar.java index db22ec228..68561776b 100644 --- a/com/hbm/blocks/TileEntityNukeTsar.java +++ b/com/hbm/blocks/TileEntityNukeTsar.java @@ -98,7 +98,7 @@ public class TileEntityNukeTsar extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -132,6 +132,7 @@ public class TileEntityNukeTsar extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -139,7 +140,7 @@ public class TileEntityNukeTsar extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -148,6 +149,7 @@ public class TileEntityNukeTsar extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); @@ -205,6 +207,6 @@ public class TileEntityNukeTsar extends TileEntity implements ISidedInventory { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityObjTester.java b/com/hbm/blocks/TileEntityObjTester.java index 104b89f6f..4008e7f92 100644 --- a/com/hbm/blocks/TileEntityObjTester.java +++ b/com/hbm/blocks/TileEntityObjTester.java @@ -5,6 +5,7 @@ import net.minecraft.util.AxisAlignedBB; public class TileEntityObjTester extends TileEntity { + @Override public int getBlockMetadata() { if (this.blockMetadata == -1) @@ -17,6 +18,6 @@ public class TileEntityObjTester extends TileEntity { @Override public AxisAlignedBB getRenderBoundingBox() { - return this.INFINITE_EXTENT_AABB; + return TileEntity.INFINITE_EXTENT_AABB; } } diff --git a/com/hbm/blocks/TileEntityRotationTester.java b/com/hbm/blocks/TileEntityRotationTester.java index b8d35df11..2a99b0c25 100644 --- a/com/hbm/blocks/TileEntityRotationTester.java +++ b/com/hbm/blocks/TileEntityRotationTester.java @@ -4,6 +4,7 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityRotationTester extends TileEntity { + @Override public int getBlockMetadata() { if (this.blockMetadata == -1) diff --git a/com/hbm/blocks/TileEntityRtgFurnace.java b/com/hbm/blocks/TileEntityRtgFurnace.java index 3649b34ca..9b6e8618d 100644 --- a/com/hbm/blocks/TileEntityRtgFurnace.java +++ b/com/hbm/blocks/TileEntityRtgFurnace.java @@ -3,7 +3,6 @@ package com.hbm.blocks; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; @@ -85,12 +84,14 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } //You scrubs aren't needed for anything (right now) + @Override public void openInventory() {} + @Override public void closeInventory() {} @Override @@ -110,6 +111,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory return false; } + @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) { @@ -131,6 +133,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory } } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -140,7 +143,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -149,6 +152,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("cookTime", (short) dualCookTime); @@ -249,6 +253,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory return this.dualCookTime > 0; } + @Override public void updateEntity() { boolean flag = this.hasPower(); boolean flag1 = false; @@ -259,7 +264,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory { dualCookTime++; - if(this.dualCookTime == this.processingSpeed) + if(this.dualCookTime == TileEntityRtgFurnace.processingSpeed) { this.dualCookTime = 0; this.processItem(); diff --git a/com/hbm/blocks/TileEntityTestContainer.java b/com/hbm/blocks/TileEntityTestContainer.java index 348759b4c..55c844945 100644 --- a/com/hbm/blocks/TileEntityTestContainer.java +++ b/com/hbm/blocks/TileEntityTestContainer.java @@ -20,22 +20,26 @@ public class TileEntityTestContainer extends TileEntityChest { public TileEntityTestContainer adjacentChestXNeg; public TileEntityTestContainer adjacentChestZPos; - public String getInventoryName() + @Override + public String getInventoryName() { return this.hasCustomInventoryName() ? this.customName : "container.testContainer"; } - public boolean hasCustomInventoryName() + @Override + public boolean hasCustomInventoryName() { return this.customName != null && this.customName.length() > 0; } - public void func_145976_a(String p_145976_1_) + @Override + public void func_145976_a(String p_145976_1_) { this.customName = p_145976_1_; } - public void readFromNBT(NBTTagCompound p_145839_1_) + @Override + public void readFromNBT(NBTTagCompound p_145839_1_) { super.readFromNBT(p_145839_1_); NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); @@ -58,7 +62,8 @@ public class TileEntityTestContainer extends TileEntityChest { } } - public void writeToNBT(NBTTagCompound p_145841_1_) + @Override + public void writeToNBT(NBTTagCompound p_145841_1_) { super.writeToNBT(p_145841_1_); NBTTagList nbttaglist = new NBTTagList(); @@ -122,7 +127,8 @@ public class TileEntityTestContainer extends TileEntityChest { } } - public void checkForAdjacentChests() + @Override + public void checkForAdjacentChests() { if (!this.adjacentChestChecked) { @@ -187,7 +193,8 @@ public class TileEntityTestContainer extends TileEntityChest { } } - public int func_145980_j() + @Override + public int func_145980_j() { if (this.cachedChestType == -1) { diff --git a/com/hbm/blocks/TileEntityTestNuke.java b/com/hbm/blocks/TileEntityTestNuke.java index df90f9bbe..6dd9f1f86 100644 --- a/com/hbm/blocks/TileEntityTestNuke.java +++ b/com/hbm/blocks/TileEntityTestNuke.java @@ -99,7 +99,7 @@ public class TileEntityTestNuke extends TileEntity implements ISidedInventory { { return false; }else{ - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <=64; + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; } } @@ -133,6 +133,7 @@ public class TileEntityTestNuke extends TileEntity implements ISidedInventory { return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; } + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); @@ -140,7 +141,7 @@ public class TileEntityTestNuke extends TileEntity implements ISidedInventory { for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = (NBTTagCompound) list.getCompoundTagAt(i); + NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); if(b0 >= 0 && b0 < slots.length) { @@ -149,6 +150,7 @@ public class TileEntityTestNuke extends TileEntity implements ISidedInventory { } } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); diff --git a/com/hbm/blocks/TileEntityWireCoated.java b/com/hbm/blocks/TileEntityWireCoated.java index ffd52ddbb..e40bafaac 100644 --- a/com/hbm/blocks/TileEntityWireCoated.java +++ b/com/hbm/blocks/TileEntityWireCoated.java @@ -9,6 +9,7 @@ public class TileEntityWireCoated extends TileEntity { public static int power; public static final int maxPower = 600; + @Override public void updateEntity() { //Energy distribution algorithm diff --git a/com/hbm/blocks/TileEntityYellowBarrel.java b/com/hbm/blocks/TileEntityYellowBarrel.java index d01018ea6..4344bec4d 100644 --- a/com/hbm/blocks/TileEntityYellowBarrel.java +++ b/com/hbm/blocks/TileEntityYellowBarrel.java @@ -4,15 +4,12 @@ import java.util.HashSet; import java.util.List; import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.explosion.ExplosionChaos; import com.hbm.lib.Library; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; @@ -22,6 +19,7 @@ import net.minecraft.util.Vec3; public class TileEntityYellowBarrel extends TileEntity { + @Override public void updateEntity() { int strength = 4; float f = strength; @@ -43,20 +41,20 @@ public class TileEntityYellowBarrel extends TileEntity { int i2 = MathHelper.floor_double(this.yCoord + wat + 1.0D); int l = MathHelper.floor_double(this.zCoord - wat - 1.0D); int j2 = MathHelper.floor_double(this.zCoord + wat + 1.0D); - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(this.xCoord, this.yCoord, this.zCoord); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(this.xCoord, this.yCoord, this.zCoord) / (double)4; + double d4 = entity.getDistance(this.xCoord, this.yCoord, this.zCoord) / 4; if (d4 <= 1.0D) { d5 = entity.posX - this.xCoord; - d6 = entity.posY + (double)entity.getEyeHeight() - this.yCoord; + d6 = entity.posY + entity.getEyeHeight() - this.yCoord; d7 = entity.posZ - this.zCoord; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity)) diff --git a/com/hbm/blocks/WasteEarth.java b/com/hbm/blocks/WasteEarth.java index a3398ff20..1a594dda6 100644 --- a/com/hbm/blocks/WasteEarth.java +++ b/com/hbm/blocks/WasteEarth.java @@ -3,7 +3,6 @@ package com.hbm.blocks; import java.util.Random; import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; @@ -12,13 +11,11 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockMushroom; import net.minecraft.block.material.Material; -import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -38,6 +35,7 @@ public class WasteEarth extends Block { this.setTickRandomly(true); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_earth_top" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_top" : ":frozen_grass_top"))); @@ -45,11 +43,13 @@ public class WasteEarth extends Block { this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_earth_side" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_side" : ":frozen_grass_side"))); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { if(this == ModBlocks.waste_earth || this == ModBlocks.waste_earth) @@ -65,12 +65,14 @@ public class WasteEarth extends Block { return null; } - public int quantityDropped(Random p_149745_1_) + @Override + public int quantityDropped(Random p_149745_1_) { return 1; } - public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) + @Override + public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) { if (entity instanceof EntityLivingBase && this == ModBlocks.waste_earth) { @@ -124,18 +126,19 @@ public class WasteEarth extends Block { } } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) { super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_); if (this == ModBlocks.waste_earth) { - p_149734_1_.spawnParticle("townaura", (double)((float)p_149734_2_ + p_149734_5_.nextFloat()), (double)((float)p_149734_3_ + 1.1F), (double)((float)p_149734_4_ + p_149734_5_.nextFloat()), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D); } if (this == ModBlocks.waste_mycelium) { - p_149734_1_.spawnParticle("townaura", (double)((float)p_149734_2_ + p_149734_5_.nextFloat()), (double)((float)p_149734_3_ + 1.1F), (double)((float)p_149734_4_ + p_149734_5_.nextFloat()), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D); } } diff --git a/com/hbm/blocks/WasteLog.java b/com/hbm/blocks/WasteLog.java index affeb9484..2079cd0f4 100644 --- a/com/hbm/blocks/WasteLog.java +++ b/com/hbm/blocks/WasteLog.java @@ -2,7 +2,6 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import cpw.mods.fml.relauncher.Side; @@ -10,10 +9,8 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; public class WasteLog extends Block { @@ -25,17 +22,20 @@ public class WasteLog extends Block { super(p_i45394_1_); } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_log ? ":waste_log_top" : ":frozen_log_top")); this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_log ? ":waste_log_side" : ":frozen_log")); } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); } + @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { if(this == ModBlocks.waste_log) @@ -50,12 +50,14 @@ public class WasteLog extends Block { return null; } - public int quantityDropped(Random p_149745_1_) + @Override + public int quantityDropped(Random p_149745_1_) { return 2 + p_149745_1_.nextInt(3); } - public int damageDropped(int p_149692_1_) + @Override + public int damageDropped(int p_149692_1_) { return 1; } diff --git a/com/hbm/blocks/YellowBarrel.java b/com/hbm/blocks/YellowBarrel.java index 1c0d0d55c..623460634 100644 --- a/com/hbm/blocks/YellowBarrel.java +++ b/com/hbm/blocks/YellowBarrel.java @@ -7,12 +7,9 @@ import com.hbm.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; @@ -29,7 +26,8 @@ public class YellowBarrel extends BlockContainer { return new TileEntityYellowBarrel(); } - public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) + @Override + public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) { if (!p_149723_1_.isRemote) { @@ -42,40 +40,47 @@ public class YellowBarrel extends BlockContainer { ExplosionNukeGeneric.waste(p_149695_1_, x, y, z, 35); } + @Override public int getRenderType(){ return -1; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister) { this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":yellow_barrel"); } + @Override public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f = 0.0625F; this.setBlockBounds(2*f, 0.0F, 2*f, 14*f, 1.0F, 14*f); } - public boolean canDropFromExplosion(Explosion p_149659_1_) + @Override + public boolean canDropFromExplosion(Explosion p_149659_1_) { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) { super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_); - p_149734_1_.spawnParticle("townaura", (double)((float)p_149734_2_ + p_149734_5_.nextFloat()), (double)((float)p_149734_3_ + 1.1F), (double)((float)p_149734_4_ + p_149734_5_.nextFloat()), 0.0D, 0.0D, 0.0D); + p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D); } } diff --git a/com/hbm/creativetabs/PartsTab.java b/com/hbm/creativetabs/PartsTab.java index 4167f7d94..35f50d033 100644 --- a/com/hbm/creativetabs/PartsTab.java +++ b/com/hbm/creativetabs/PartsTab.java @@ -1,6 +1,5 @@ package com.hbm.creativetabs; -import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; import net.minecraft.creativetab.CreativeTabs; diff --git a/com/hbm/entity/EntityAINuclearCreeperSwell.java b/com/hbm/entity/EntityAINuclearCreeperSwell.java index da6dec14a..00713bf29 100644 --- a/com/hbm/entity/EntityAINuclearCreeperSwell.java +++ b/com/hbm/entity/EntityAINuclearCreeperSwell.java @@ -2,7 +2,6 @@ package com.hbm.entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.monster.EntityCreeper; public class EntityAINuclearCreeperSwell extends EntityAIBase { /** The creeper that is swelling. */ @@ -20,7 +19,8 @@ public class EntityAINuclearCreeperSwell extends EntityAIBase { /** * Returns whether the EntityAIBase should begin execution. */ - public boolean shouldExecute() + @Override + public boolean shouldExecute() { EntityLivingBase entitylivingbase = this.swellingCreeper.getAttackTarget(); return this.swellingCreeper.getCreeperState() > 0 || entitylivingbase != null && this.swellingCreeper.getDistanceSqToEntity(entitylivingbase) < 9.0D; @@ -29,7 +29,8 @@ public class EntityAINuclearCreeperSwell extends EntityAIBase { /** * Execute a one shot task or start executing a continuous task */ - public void startExecuting() + @Override + public void startExecuting() { this.swellingCreeper.getNavigator().clearPathEntity(); this.creeperAttackTarget = this.swellingCreeper.getAttackTarget(); @@ -38,7 +39,8 @@ public class EntityAINuclearCreeperSwell extends EntityAIBase { /** * Resets the task */ - public void resetTask() + @Override + public void resetTask() { this.creeperAttackTarget = null; } @@ -46,7 +48,8 @@ public class EntityAINuclearCreeperSwell extends EntityAIBase { /** * Updates the task */ - public void updateTask() + @Override + public void updateTask() { if (this.creeperAttackTarget == null) { diff --git a/com/hbm/entity/EntityBullet.java b/com/hbm/entity/EntityBullet.java index 34ba65cf8..3bf399a21 100644 --- a/com/hbm/entity/EntityBullet.java +++ b/com/hbm/entity/EntityBullet.java @@ -83,11 +83,11 @@ public class EntityBullet extends Entity implements IProjectile this.canBePickedUp = 1; } - this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { @@ -98,7 +98,7 @@ public class EntityBullet extends Entity implements IProjectile this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_); + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); } } @@ -114,15 +114,15 @@ public class EntityBullet extends Entity implements IProjectile } this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.posY -= 0.10000000149011612D; - this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); //this.dmgMin = dmgMin; @@ -143,7 +143,8 @@ public class EntityBullet extends Entity implements IProjectile this.gravity = grav; } - protected void entityInit() + @Override + protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } @@ -151,24 +152,25 @@ public class EntityBullet extends Entity implements IProjectile /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ - public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) { float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); - p_70186_1_ /= (double)f2; - p_70186_3_ /= (double)f2; - p_70186_5_ /= (double)f2; - p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_1_ *= (double)p_70186_7_; - p_70186_3_ *= (double)p_70186_7_; - p_70186_5_ *= (double)p_70186_7_; + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; this.motionX = p_70186_1_; this.motionY = p_70186_3_; this.motionZ = p_70186_5_; float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); this.ticksInGround = 0; } @@ -176,7 +178,8 @@ public class EntityBullet extends Entity implements IProjectile * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) { this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); @@ -186,7 +189,8 @@ public class EntityBullet extends Entity implements IProjectile /** * Sets the velocity to the args. Args: x, y, z */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { this.motionX = p_70016_1_; @@ -197,7 +201,7 @@ public class EntityBullet extends Entity implements IProjectile { float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); @@ -209,7 +213,8 @@ public class EntityBullet extends Entity implements IProjectile * Called to update the entity's position/logic. */ //@Override - public void onUpdate() + @Override + public void onUpdate() { super.onUpdate(); @@ -280,7 +285,7 @@ public class EntityBullet extends Entity implements IProjectile if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) @@ -320,7 +325,7 @@ public class EntityBullet extends Entity implements IProjectile if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - int k = MathHelper.ceiling_double_int((double)f2 * this.damage); + int k = MathHelper.ceiling_double_int(f2 * this.damage); if (this.getIsCritical()) { @@ -360,7 +365,7 @@ public class EntityBullet extends Entity implements IProjectile if (f4 > 0.0F) { - movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); } } @@ -408,13 +413,13 @@ public class EntityBullet extends Entity implements IProjectile this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; - this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; this.inGround = true; this.arrowShake = 7; this.setIsCritical(false); @@ -462,7 +467,7 @@ public class EntityBullet extends Entity implements IProjectile for (int l = 0; l < 4; ++l) { f4 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; @@ -473,10 +478,10 @@ public class EntityBullet extends Entity implements IProjectile this.extinguish(); } - this.motionX *= (double)f3; - this.motionY *= (double)f3; - this.motionZ *= (double)f3; - this.motionY -= (double)gravity; + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } @@ -485,7 +490,8 @@ public class EntityBullet extends Entity implements IProjectile /** * (abstract) Protected helper method to write subclass entity data to NBT. */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { p_70014_1_.setShort("xTile", (short)this.field_145791_d); p_70014_1_.setShort("yTile", (short)this.field_145792_e); @@ -502,7 +508,8 @@ public class EntityBullet extends Entity implements IProjectile /** * (abstract) Protected helper method to read subclass entity data from NBT. */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { this.field_145791_d = p_70037_1_.getShort("xTile"); this.field_145792_e = p_70037_1_.getShort("yTile"); @@ -531,7 +538,8 @@ public class EntityBullet extends Entity implements IProjectile /** * Called by a player entity when they collide with an entity */ - public void onCollideWithPlayer(EntityPlayer p_70100_1_) + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { @@ -554,12 +562,14 @@ public class EntityBullet extends Entity implements IProjectile * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ - protected boolean canTriggerWalking() + @Override + protected boolean canTriggerWalking() { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; @@ -586,7 +596,8 @@ public class EntityBullet extends Entity implements IProjectile /** * If returns false, the item will not inflict any damage against entities. */ - public boolean canAttackWithItem() + @Override + public boolean canAttackWithItem() { return false; } diff --git a/com/hbm/entity/EntityGrenadeCluster.java b/com/hbm/entity/EntityGrenadeCluster.java index eba166087..32c155ac4 100644 --- a/com/hbm/entity/EntityGrenadeCluster.java +++ b/com/hbm/entity/EntityGrenadeCluster.java @@ -28,7 +28,8 @@ public class EntityGrenadeCluster extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -39,7 +40,7 @@ public class EntityGrenadeCluster extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeElectric.java b/com/hbm/entity/EntityGrenadeElectric.java index f10b3ed45..0061a7a81 100644 --- a/com/hbm/entity/EntityGrenadeElectric.java +++ b/com/hbm/entity/EntityGrenadeElectric.java @@ -1,11 +1,9 @@ package com.hbm.entity; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -29,7 +27,8 @@ public class EntityGrenadeElectric extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -40,7 +39,7 @@ public class EntityGrenadeElectric extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeFire.java b/com/hbm/entity/EntityGrenadeFire.java index a777b96ea..be3627089 100644 --- a/com/hbm/entity/EntityGrenadeFire.java +++ b/com/hbm/entity/EntityGrenadeFire.java @@ -30,7 +30,8 @@ public class EntityGrenadeFire extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -41,7 +42,7 @@ public class EntityGrenadeFire extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeFlare.java b/com/hbm/entity/EntityGrenadeFlare.java index f70e6b155..64e621341 100644 --- a/com/hbm/entity/EntityGrenadeFlare.java +++ b/com/hbm/entity/EntityGrenadeFlare.java @@ -1,13 +1,8 @@ package com.hbm.entity; -import com.hbm.explosion.ExplosionChaos; - import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -31,7 +26,8 @@ public class EntityGrenadeFlare extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - public void onUpdate() { + @Override + public void onUpdate() { super.onUpdate(); if(this.ticksExisted > 250) { @@ -39,7 +35,8 @@ public class EntityGrenadeFlare extends EntityThrowable } } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { this.motionX = 0; this.motionY = 0; diff --git a/com/hbm/entity/EntityGrenadeFrag.java b/com/hbm/entity/EntityGrenadeFrag.java index e57fa942a..5b4f48733 100644 --- a/com/hbm/entity/EntityGrenadeFrag.java +++ b/com/hbm/entity/EntityGrenadeFrag.java @@ -30,7 +30,8 @@ public class EntityGrenadeFrag extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -41,7 +42,7 @@ public class EntityGrenadeFrag extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeGas.java b/com/hbm/entity/EntityGrenadeGas.java index 5f52eafd1..7633df38f 100644 --- a/com/hbm/entity/EntityGrenadeGas.java +++ b/com/hbm/entity/EntityGrenadeGas.java @@ -1,10 +1,8 @@ package com.hbm.entity; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -30,7 +28,8 @@ public class EntityGrenadeGas extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -41,7 +40,7 @@ public class EntityGrenadeGas extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeGeneric.java b/com/hbm/entity/EntityGrenadeGeneric.java index b543e322b..01d185696 100644 --- a/com/hbm/entity/EntityGrenadeGeneric.java +++ b/com/hbm/entity/EntityGrenadeGeneric.java @@ -1,12 +1,8 @@ package com.hbm.entity; -import com.hbm.explosion.ExplosionChaos; - -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -30,7 +26,8 @@ public class EntityGrenadeGeneric extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -41,7 +38,7 @@ public class EntityGrenadeGeneric extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeNuke.java b/com/hbm/entity/EntityGrenadeNuke.java index d51b8a818..2a2adc2ec 100644 --- a/com/hbm/entity/EntityGrenadeNuke.java +++ b/com/hbm/entity/EntityGrenadeNuke.java @@ -1,12 +1,8 @@ package com.hbm.entity; -import com.hbm.explosion.ExplosionChaos; - -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -31,7 +27,8 @@ public class EntityGrenadeNuke extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -42,7 +39,7 @@ public class EntityGrenadeNuke extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadePoison.java b/com/hbm/entity/EntityGrenadePoison.java index 09deb6a1c..3eaee4aa0 100644 --- a/com/hbm/entity/EntityGrenadePoison.java +++ b/com/hbm/entity/EntityGrenadePoison.java @@ -1,13 +1,10 @@ package com.hbm.entity; -import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionNukeGeneric; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -31,7 +28,8 @@ public class EntityGrenadePoison extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -42,7 +40,7 @@ public class EntityGrenadePoison extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeSchrabidium.java b/com/hbm/entity/EntityGrenadeSchrabidium.java index f1923ec06..442e9344d 100644 --- a/com/hbm/entity/EntityGrenadeSchrabidium.java +++ b/com/hbm/entity/EntityGrenadeSchrabidium.java @@ -2,11 +2,9 @@ package com.hbm.entity; import com.hbm.explosion.ExplosionChaos; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -30,7 +28,8 @@ public class EntityGrenadeSchrabidium extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -41,7 +40,7 @@ public class EntityGrenadeSchrabidium extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityGrenadeStrong.java b/com/hbm/entity/EntityGrenadeStrong.java index 3bafb236e..8e52de366 100644 --- a/com/hbm/entity/EntityGrenadeStrong.java +++ b/com/hbm/entity/EntityGrenadeStrong.java @@ -7,8 +7,6 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import com.hbm.explosion.ExplosionChaos; - public class EntityGrenadeStrong extends EntityThrowable { private static final String __OBFID = "CL_00001722"; @@ -28,7 +26,8 @@ public class EntityGrenadeStrong extends EntityThrowable super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); } - protected void onImpact(MovingObjectPosition p_70184_1_) + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { if (p_70184_1_.entityHit != null) { @@ -39,7 +38,7 @@ public class EntityGrenadeStrong extends EntityThrowable b0 = 3; } - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0); + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); } if (!this.worldObj.isRemote) diff --git a/com/hbm/entity/EntityMirv.java b/com/hbm/entity/EntityMirv.java index fae2556ef..c19c15f36 100644 --- a/com/hbm/entity/EntityMirv.java +++ b/com/hbm/entity/EntityMirv.java @@ -2,10 +2,8 @@ package com.hbm.entity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -53,7 +51,7 @@ public class EntityMirv extends EntityThrowable { float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } @@ -79,7 +77,8 @@ public class EntityMirv extends EntityThrowable { } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { return distance < 25000; diff --git a/com/hbm/entity/EntityMissileAntiBallistic.java b/com/hbm/entity/EntityMissileAntiBallistic.java index bedd1ea56..1468b569e 100644 --- a/com/hbm/entity/EntityMissileAntiBallistic.java +++ b/com/hbm/entity/EntityMissileAntiBallistic.java @@ -31,7 +31,7 @@ public class EntityMissileAntiBallistic extends EntityMissileBase { if(missile0 == null) { - missile0 = ExplosionChaos.getHomingTarget(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25, (Entity)this); + missile0 = ExplosionChaos.getHomingTarget(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25, this); } if(missile0 != null && missile == null) { diff --git a/com/hbm/entity/EntityMissileBase.java b/com/hbm/entity/EntityMissileBase.java index f4212667d..86e6b04cb 100644 --- a/com/hbm/entity/EntityMissileBase.java +++ b/com/hbm/entity/EntityMissileBase.java @@ -82,7 +82,7 @@ public class EntityMissileBase extends EntityThrowable { float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } @@ -240,7 +240,8 @@ public class EntityMissileBase extends EntityThrowable { } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { return distance < 25000; diff --git a/com/hbm/entity/EntityMissileIncendiary.java b/com/hbm/entity/EntityMissileIncendiary.java index ec7e65611..7f62b77f1 100644 --- a/com/hbm/entity/EntityMissileIncendiary.java +++ b/com/hbm/entity/EntityMissileIncendiary.java @@ -140,7 +140,7 @@ public class EntityMissileIncendiary extends EntityMissileBase { { if(!this.worldObj.isRemote) { - this.worldObj.newExplosion((Entity)null, (double)((float)this.posX + 0.5F), (double)((float)this.posY + 0.5F), (double)((float)this.posZ + 0.5F), 10.0F, true, true); + this.worldObj.newExplosion((Entity)null, (float)this.posX + 0.5F, (float)this.posY + 0.5F, (float)this.posZ + 0.5F, 10.0F, true, true); } this.setDead(); } diff --git a/com/hbm/entity/EntityMissileIncendiaryStrong.java b/com/hbm/entity/EntityMissileIncendiaryStrong.java index 2aac8cc14..81184b804 100644 --- a/com/hbm/entity/EntityMissileIncendiaryStrong.java +++ b/com/hbm/entity/EntityMissileIncendiaryStrong.java @@ -143,7 +143,7 @@ public class EntityMissileIncendiaryStrong extends EntityMissileBase { { if(!this.worldObj.isRemote) { - this.worldObj.newExplosion((Entity)null, (double)((float)this.posX + 0.5F), (double)((float)this.posY + 0.5F), (double)((float)this.posZ + 0.5F), 25.0F, true, true); + this.worldObj.newExplosion((Entity)null, (float)this.posX + 0.5F, (float)this.posY + 0.5F, (float)this.posZ + 0.5F, 25.0F, true, true); ExplosionChaos.flameDeath(this.worldObj, (int)((float)this.posX + 0.5F), (int)((float)this.posY + 0.5F), (int)((float)this.posZ + 0.5F), 25); } this.setDead(); diff --git a/com/hbm/entity/EntityMissileInferno.java b/com/hbm/entity/EntityMissileInferno.java index 2bbf7d436..1f6384f73 100644 --- a/com/hbm/entity/EntityMissileInferno.java +++ b/com/hbm/entity/EntityMissileInferno.java @@ -143,7 +143,7 @@ public class EntityMissileInferno extends EntityMissileBase { { if(!this.worldObj.isRemote) { - this.worldObj.newExplosion((Entity)null, (double)((float)this.posX + 0.5F), (double)((float)this.posY + 0.5F), (double)((float)this.posZ + 0.5F), 35.0F, true, true); + this.worldObj.newExplosion((Entity)null, (float)this.posX + 0.5F, (float)this.posY + 0.5F, (float)this.posZ + 0.5F, 35.0F, true, true); ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10); ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25); } diff --git a/com/hbm/entity/EntityNuclearCreeper.java b/com/hbm/entity/EntityNuclearCreeper.java index e384639f6..5afa05cbf 100644 --- a/com/hbm/entity/EntityNuclearCreeper.java +++ b/com/hbm/entity/EntityNuclearCreeper.java @@ -12,8 +12,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIAvoidEntity; -import net.minecraft.entity.ai.EntityAICreeperSwell; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; @@ -67,7 +65,8 @@ public class EntityNuclearCreeper extends EntityMob { this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityOcelot.class, 0, true)); } - protected void applyEntityAttributes() + @Override + protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50.0D); @@ -77,7 +76,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Returns true if the newer Entity AI code should be run */ - public boolean isAIEnabled() + @Override + public boolean isAIEnabled() { return true; } @@ -85,7 +85,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * The number of iterations PathFinder.getSafePoint will execute before giving up. */ - public int getMaxSafePointTries() + @Override + public int getMaxSafePointTries() { return this.getAttackTarget() == null ? 3 : 3 + (int)(this.getHealth() - 1.0F); } @@ -93,10 +94,11 @@ public class EntityNuclearCreeper extends EntityMob { /** * Called when the mob is falling. Calculates and applies fall damage. */ - protected void fall(float p_70069_1_) + @Override + protected void fall(float p_70069_1_) { super.fall(p_70069_1_); - this.timeSinceIgnited = (int)((float)this.timeSinceIgnited + p_70069_1_ * 1.5F); + this.timeSinceIgnited = (int)(this.timeSinceIgnited + p_70069_1_ * 1.5F); if (this.timeSinceIgnited > this.fuseTime - 5) { @@ -104,7 +106,8 @@ public class EntityNuclearCreeper extends EntityMob { } } - protected void entityInit() + @Override + protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(16, Byte.valueOf((byte) - 1)); @@ -115,7 +118,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * (abstract) Protected helper method to write subclass entity data to NBT. */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { super.writeEntityToNBT(p_70014_1_); @@ -132,7 +136,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * (abstract) Protected helper method to read subclass entity data from NBT. */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { super.readEntityFromNBT(p_70037_1_); this.dataWatcher.updateObject(17, Byte.valueOf((byte)(p_70037_1_.getBoolean("powered") ? 1 : 0))); @@ -156,7 +161,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Called to update the entity's position/logic. */ - public void onUpdate() + @Override + public void onUpdate() { if (this.isEntityAlive()) { @@ -207,20 +213,20 @@ public class EntityNuclearCreeper extends EntityMob { int i2 = MathHelper.floor_double(this.posY + wat + 1.0D); int l = MathHelper.floor_double(this.posZ - wat - 1.0D); int j2 = MathHelper.floor_double(this.posZ + wat + 1.0D); - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(this.posX, this.posY, this.posZ) / (double)4; + double d4 = entity.getDistance(this.posX, this.posY, this.posZ) / 4; if (d4 <= 1.0D) { d5 = entity.posX - this.posX; - d6 = entity.posY + (double)entity.getEyeHeight() - this.posY; + d6 = entity.posY + entity.getEyeHeight() - this.posY; d7 = entity.posZ - this.posZ; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity)) @@ -255,7 +261,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Returns the sound this mob makes when it is hurt. */ - protected String getHurtSound() + @Override + protected String getHurtSound() { return "mob.creeper.say"; } @@ -263,7 +270,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Returns the sound this mob makes on death. */ - protected String getDeathSound() + @Override + protected String getDeathSound() { return "mob.creeper.death"; } @@ -271,7 +279,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Called when the mob's health reaches 0. */ - public void onDeath(DamageSource p_70645_1_) + @Override + public void onDeath(DamageSource p_70645_1_) { super.onDeath(p_70645_1_); @@ -314,7 +323,8 @@ public class EntityNuclearCreeper extends EntityMob { } } - public boolean attackEntityAsMob(Entity p_70652_1_) + @Override + public boolean attackEntityAsMob(Entity p_70652_1_) { return true; } @@ -333,10 +343,11 @@ public class EntityNuclearCreeper extends EntityMob { @SideOnly(Side.CLIENT) public float getCreeperFlashIntensity(float p_70831_1_) { - return ((float)this.lastActiveTime + (float)(this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (float)(this.fuseTime - 2); + return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2); } - protected Item getDropItem() + @Override + protected Item getDropItem() { return Item.getItemFromBlock(Blocks.tnt); } @@ -360,7 +371,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Called when a lightning bolt hits the entity. */ - public void onStruckByLightning(EntityLightningBolt p_70077_1_) + @Override + public void onStruckByLightning(EntityLightningBolt p_70077_1_) { super.onStruckByLightning(p_70077_1_); this.dataWatcher.updateObject(17, Byte.valueOf((byte)1)); @@ -369,7 +381,8 @@ public class EntityNuclearCreeper extends EntityMob { /** * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. */ - protected boolean interact(EntityPlayer p_70085_1_) + @Override + protected boolean interact(EntityPlayer p_70085_1_) { ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); diff --git a/com/hbm/entity/EntityNukeCloudSmall.java b/com/hbm/entity/EntityNukeCloudSmall.java index c8a59536e..eb6adc580 100644 --- a/com/hbm/entity/EntityNukeCloudSmall.java +++ b/com/hbm/entity/EntityNukeCloudSmall.java @@ -20,13 +20,15 @@ public class EntityNukeCloudSmall extends Entity { this.age = 0; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public int getBrightnessForRender(float p_70070_1_) { return 15728880; } - public float getBrightness(float p_70013_1_) + @Override + public float getBrightness(float p_70013_1_) { return 1.0F; } @@ -38,7 +40,8 @@ public class EntityNukeCloudSmall extends Entity { this.maxAge = maxAge; } - public void onUpdate() { + @Override + public void onUpdate() { //super.onUpdate(); this.age++; this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, this.posX, this.posY + 200, this.posZ)); diff --git a/com/hbm/entity/EntityNukeExplosion.java b/com/hbm/entity/EntityNukeExplosion.java index c815a8248..461fc8826 100644 --- a/com/hbm/entity/EntityNukeExplosion.java +++ b/com/hbm/entity/EntityNukeExplosion.java @@ -72,7 +72,8 @@ public class EntityNukeExplosion extends Entity { super(p_i1582_1_); } - public void onUpdate() { + @Override + public void onUpdate() { super.onUpdate(); if(this.counter >= steps) @@ -99,6 +100,7 @@ public class EntityNukeExplosion extends Entity { this.age++; } + @Override protected void entityInit() { } diff --git a/com/hbm/entity/EntityNukeExplosionAdvanced.java b/com/hbm/entity/EntityNukeExplosionAdvanced.java index 857eca0a1..0383f7ede 100644 --- a/com/hbm/entity/EntityNukeExplosionAdvanced.java +++ b/com/hbm/entity/EntityNukeExplosionAdvanced.java @@ -3,12 +3,9 @@ package com.hbm.entity; import java.util.HashSet; import java.util.List; -import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -34,7 +31,8 @@ public class EntityNukeExplosionAdvanced extends Entity { super(p_i1582_1_); } - public void onUpdate() { + @Override + public void onUpdate() { super.onUpdate(); if(!this.did) @@ -82,6 +80,7 @@ public class EntityNukeExplosionAdvanced extends Entity { age++; } + @Override protected void entityInit() { } @@ -113,20 +112,20 @@ public class EntityNukeExplosionAdvanced extends Entity { int i2 = MathHelper.floor_double(y + f + 1.0D); int l = MathHelper.floor_double(z - f - 1.0D); int j2 = MathHelper.floor_double(z + f + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)f; + double d4 = entity.getDistance(x, y, z) / f; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < f && (entity instanceof EntityNukeCloudSmall)) { { diff --git a/com/hbm/entity/EntityRocket.java b/com/hbm/entity/EntityRocket.java index 855debe71..e20c03052 100644 --- a/com/hbm/entity/EntityRocket.java +++ b/com/hbm/entity/EntityRocket.java @@ -16,7 +16,6 @@ import net.minecraft.entity.IProjectile; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.S2BPacketChangeGameState; @@ -77,11 +76,11 @@ public class EntityRocket extends Entity implements IProjectile this.canBePickedUp = 1; } - this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { @@ -92,7 +91,7 @@ public class EntityRocket extends Entity implements IProjectile this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_); + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); } } @@ -108,15 +107,15 @@ public class EntityRocket extends Entity implements IProjectile } this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.posY -= 0.10000000149011612D; - this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); } @@ -133,7 +132,8 @@ public class EntityRocket extends Entity implements IProjectile this.gravity = grav; } - protected void entityInit() + @Override + protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } @@ -141,24 +141,25 @@ public class EntityRocket extends Entity implements IProjectile /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ - public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) { float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); - p_70186_1_ /= (double)f2; - p_70186_3_ /= (double)f2; - p_70186_5_ /= (double)f2; - p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_1_ *= (double)p_70186_7_; - p_70186_3_ *= (double)p_70186_7_; - p_70186_5_ *= (double)p_70186_7_; + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; this.motionX = p_70186_1_; this.motionY = p_70186_3_; this.motionZ = p_70186_5_; float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); this.ticksInGround = 0; } @@ -166,7 +167,8 @@ public class EntityRocket extends Entity implements IProjectile * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) { this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); @@ -176,7 +178,8 @@ public class EntityRocket extends Entity implements IProjectile /** * Sets the velocity to the args. Args: x, y, z */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { this.motionX = p_70016_1_; @@ -187,7 +190,7 @@ public class EntityRocket extends Entity implements IProjectile { float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); @@ -199,7 +202,8 @@ public class EntityRocket extends Entity implements IProjectile * Called to update the entity's position/logic. */ //@Override - public void onUpdate() + @Override + public void onUpdate() { super.onUpdate(); @@ -285,7 +289,7 @@ public class EntityRocket extends Entity implements IProjectile if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) @@ -324,7 +328,7 @@ public class EntityRocket extends Entity implements IProjectile if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - int k = MathHelper.ceiling_double_int((double)f2 * this.damage); + int k = MathHelper.ceiling_double_int(f2 * this.damage); if (this.getIsCritical()) { @@ -347,7 +351,7 @@ public class EntityRocket extends Entity implements IProjectile movingobjectposition.entityHit.setFire(5); } - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) { if (movingobjectposition.entityHit instanceof EntityLivingBase) { @@ -364,7 +368,7 @@ public class EntityRocket extends Entity implements IProjectile if (f4 > 0.0F) { - movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); } } @@ -406,13 +410,13 @@ public class EntityRocket extends Entity implements IProjectile this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; - this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; @@ -469,7 +473,7 @@ public class EntityRocket extends Entity implements IProjectile for (int l = 0; l < 4; ++l) { f4 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; @@ -480,10 +484,10 @@ public class EntityRocket extends Entity implements IProjectile this.extinguish(); } - this.motionX *= (double)f3; - this.motionY *= (double)f3; - this.motionZ *= (double)f3; - this.motionY -= (double)gravity; + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } @@ -492,7 +496,8 @@ public class EntityRocket extends Entity implements IProjectile /** * (abstract) Protected helper method to write subclass entity data to NBT. */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { p_70014_1_.setShort("xTile", (short)this.field_145791_d); p_70014_1_.setShort("yTile", (short)this.field_145792_e); @@ -509,7 +514,8 @@ public class EntityRocket extends Entity implements IProjectile /** * (abstract) Protected helper method to read subclass entity data from NBT. */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { this.field_145791_d = p_70037_1_.getShort("xTile"); this.field_145792_e = p_70037_1_.getShort("yTile"); @@ -538,7 +544,8 @@ public class EntityRocket extends Entity implements IProjectile /** * Called by a player entity when they collide with an entity */ - public void onCollideWithPlayer(EntityPlayer p_70100_1_) + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { @@ -562,12 +569,14 @@ public class EntityRocket extends Entity implements IProjectile * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ - protected boolean canTriggerWalking() + @Override + protected boolean canTriggerWalking() { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; @@ -594,7 +603,8 @@ public class EntityRocket extends Entity implements IProjectile /** * If returns false, the item will not inflict any damage against entities. */ - public boolean canAttackWithItem() + @Override + public boolean canAttackWithItem() { return false; } diff --git a/com/hbm/entity/EntitySchrab.java b/com/hbm/entity/EntitySchrab.java index 7ea64bd0f..8c360c15b 100644 --- a/com/hbm/entity/EntitySchrab.java +++ b/com/hbm/entity/EntitySchrab.java @@ -79,11 +79,11 @@ public class EntitySchrab extends Entity implements IProjectile this.canBePickedUp = 1; } - this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { @@ -94,7 +94,7 @@ public class EntitySchrab extends Entity implements IProjectile this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_); + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); } } @@ -110,15 +110,15 @@ public class EntitySchrab extends Entity implements IProjectile } this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.posY -= 0.10000000149011612D; - this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; - this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); - this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); } @@ -135,7 +135,8 @@ public class EntitySchrab extends Entity implements IProjectile this.gravity = grav; } - protected void entityInit() + @Override + protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } @@ -143,24 +144,25 @@ public class EntitySchrab extends Entity implements IProjectile /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ - public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) { float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); - p_70186_1_ /= (double)f2; - p_70186_3_ /= (double)f2; - p_70186_5_ /= (double)f2; - p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; - p_70186_1_ *= (double)p_70186_7_; - p_70186_3_ *= (double)p_70186_7_; - p_70186_5_ *= (double)p_70186_7_; + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; this.motionX = p_70186_1_; this.motionY = p_70186_3_; this.motionZ = p_70186_5_; float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); this.ticksInGround = 0; } @@ -168,7 +170,8 @@ public class EntitySchrab extends Entity implements IProjectile * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) { this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); @@ -178,7 +181,8 @@ public class EntitySchrab extends Entity implements IProjectile /** * Sets the velocity to the args. Args: x, y, z */ - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { this.motionX = p_70016_1_; @@ -189,7 +193,7 @@ public class EntitySchrab extends Entity implements IProjectile { float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); @@ -201,7 +205,8 @@ public class EntitySchrab extends Entity implements IProjectile * Called to update the entity's position/logic. */ //@Override - public void onUpdate() + @Override + public void onUpdate() { super.onUpdate(); @@ -292,7 +297,7 @@ public class EntitySchrab extends Entity implements IProjectile if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) @@ -331,7 +336,7 @@ public class EntitySchrab extends Entity implements IProjectile if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - int k = MathHelper.ceiling_double_int((double)f2 * this.damage); + int k = MathHelper.ceiling_double_int(f2 * this.damage); if (this.getIsCritical()) { @@ -354,7 +359,7 @@ public class EntitySchrab extends Entity implements IProjectile movingobjectposition.entityHit.setFire(5); } - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) { if (movingobjectposition.entityHit instanceof EntityLivingBase) { @@ -371,7 +376,7 @@ public class EntitySchrab extends Entity implements IProjectile if (f4 > 0.0F) { - movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); } } @@ -413,13 +418,13 @@ public class EntitySchrab extends Entity implements IProjectile this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; - this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; @@ -476,7 +481,7 @@ public class EntitySchrab extends Entity implements IProjectile for (int l = 0; l < 4; ++l) { f4 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; @@ -487,10 +492,10 @@ public class EntitySchrab extends Entity implements IProjectile this.extinguish(); } - this.motionX *= (double)f3; - this.motionY *= (double)f3; - this.motionZ *= (double)f3; - this.motionY -= (double)gravity; + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } @@ -499,7 +504,8 @@ public class EntitySchrab extends Entity implements IProjectile /** * (abstract) Protected helper method to write subclass entity data to NBT. */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { p_70014_1_.setShort("xTile", (short)this.field_145791_d); p_70014_1_.setShort("yTile", (short)this.field_145792_e); @@ -516,7 +522,8 @@ public class EntitySchrab extends Entity implements IProjectile /** * (abstract) Protected helper method to read subclass entity data from NBT. */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { this.field_145791_d = p_70037_1_.getShort("xTile"); this.field_145792_e = p_70037_1_.getShort("yTile"); @@ -545,7 +552,8 @@ public class EntitySchrab extends Entity implements IProjectile /** * Called by a player entity when they collide with an entity */ - public void onCollideWithPlayer(EntityPlayer p_70100_1_) + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { @@ -569,12 +577,14 @@ public class EntitySchrab extends Entity implements IProjectile * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ - protected boolean canTriggerWalking() + @Override + protected boolean canTriggerWalking() { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; @@ -601,7 +611,8 @@ public class EntitySchrab extends Entity implements IProjectile /** * If returns false, the item will not inflict any damage against entities. */ - public boolean canAttackWithItem() + @Override + public boolean canAttackWithItem() { return false; } diff --git a/com/hbm/entity/EntityTestMissile.java b/com/hbm/entity/EntityTestMissile.java index 0783673a5..f62f0a0c3 100644 --- a/com/hbm/entity/EntityTestMissile.java +++ b/com/hbm/entity/EntityTestMissile.java @@ -1,14 +1,8 @@ package com.hbm.entity; import com.hbm.calc.EasyLocation; -import com.hbm.calc.EasyVector; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.IProjectile; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -257,7 +251,7 @@ public class EntityTestMissile extends EntityThrowable { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } diff --git a/com/hbm/explosion/ExplosionChaos.java b/com/hbm/explosion/ExplosionChaos.java index 506868e5e..fd7f7a615 100644 --- a/com/hbm/explosion/ExplosionChaos.java +++ b/com/hbm/explosion/ExplosionChaos.java @@ -5,39 +5,28 @@ import java.util.List; import java.util.Random; import com.hbm.blocks.ModBlocks; -import com.hbm.entity.EntityGrenadeNuke; import com.hbm.entity.EntityMirv; -import com.hbm.entity.EntityMissileAntiBallistic; import com.hbm.entity.EntityMissileBase; -import com.hbm.entity.EntityNukeCloudSmall; import com.hbm.entity.EntityRocket; import com.hbm.entity.EntitySchrab; import com.hbm.lib.Library; import net.minecraft.block.Block; -import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.item.EntityTNTPrimed; -import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraft.world.WorldSettings.GameType; import net.minecraftforge.common.util.ForgeDirection; public class ExplosionChaos { @@ -414,20 +403,20 @@ public class ExplosionChaos { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength; + double d4 = entity.getDistance(x, y, z) / bombStartStrength; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { if(entity instanceof EntityPlayer && Library.checkForGasMask((EntityPlayer)entity)) @@ -507,18 +496,18 @@ public class ExplosionChaos { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)radius; + double d4 = entity.getDistance(x, y, z) / radius; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; if(entity instanceof EntityLiving && !(entity instanceof EntitySheep)) { @@ -536,7 +525,7 @@ public class ExplosionChaos { ((EntityLiving)entity).setCustomNameTag("jeb_"); } - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { entity.setPosition(entity.posX += a, entity.posY += b, entity.posZ += c); @@ -567,26 +556,26 @@ public class ExplosionChaos { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(e, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(e, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)radius; + double d4 = entity.getDistance(x, y, z) / radius; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (true) { d5 /= d9; d6 /= d9; d7 /= d9; - double d10 = (double)world.getBlockDensity(vec3, entity.boundingBox); + double d10 = world.getBlockDensity(vec3, entity.boundingBox); if(entity instanceof EntityMissileBase) { return entity; @@ -619,26 +608,26 @@ public class ExplosionChaos { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(e, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(e, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)radius; + double d4 = entity.getDistance(x, y, z) / radius; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (true) { d5 /= d9; d6 /= d9; d7 /= d9; - double d10 = (double)world.getBlockDensity(vec3, entity.boundingBox); + double d10 = world.getBlockDensity(vec3, entity.boundingBox); if(entity instanceof EntityMissileBase) { entity = null; diff --git a/com/hbm/explosion/ExplosionFleija.java b/com/hbm/explosion/ExplosionFleija.java index bd35b2fb2..9556b6015 100644 --- a/com/hbm/explosion/ExplosionFleija.java +++ b/com/hbm/explosion/ExplosionFleija.java @@ -1,13 +1,6 @@ package com.hbm.explosion; import com.hbm.blocks.DecoBlockAlt; -import com.hbm.particles.NukeCloudFX; -import com.hbm.particles.NukeSmokeFX; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/explosion/ExplosionNukeAdvanced.java b/com/hbm/explosion/ExplosionNukeAdvanced.java index d7e68270a..dedf4ca45 100644 --- a/com/hbm/explosion/ExplosionNukeAdvanced.java +++ b/com/hbm/explosion/ExplosionNukeAdvanced.java @@ -1,13 +1,5 @@ package com.hbm.explosion; -import com.hbm.particles.NukeCloudFX; -import com.hbm.particles.NukeSmokeFX; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.init.Blocks; import net.minecraft.world.World; public class ExplosionNukeAdvanced diff --git a/com/hbm/explosion/ExplosionNukeGeneric.java b/com/hbm/explosion/ExplosionNukeGeneric.java index fbffe2d41..8436a00f8 100644 --- a/com/hbm/explosion/ExplosionNukeGeneric.java +++ b/com/hbm/explosion/ExplosionNukeGeneric.java @@ -1,15 +1,12 @@ package com.hbm.explosion; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Random; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; @@ -24,7 +21,6 @@ import com.hbm.blocks.DecoBlockAlt; import com.hbm.blocks.ModBlocks; import com.hbm.entity.EntityMirv; import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; public class ExplosionNukeGeneric { @@ -104,20 +100,20 @@ public class ExplosionNukeGeneric { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength; + double d4 = entity.getDistance(x, y, z) / bombStartStrength; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) && !(entity instanceof EntityMirv)) { d5 /= d9; @@ -128,7 +124,7 @@ public class ExplosionNukeGeneric { double d11 = (1.0D - d4);// * d10; if(!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP && ((EntityPlayerMP)entity).theItemInWorldManager.getGameType() != GameType.CREATIVE)) { - entity.attackEntityFrom(DamageSource.generic, (float)((int)((d11 * d11 + d11) / 2.0D * 8.0D * (double)bombStartStrength + 1.0D))); + entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D))); entity.setFire(30); double d8 = EnchantmentProtection.func_92092_a(entity, d11); entity.motionX += d5 * d8; diff --git a/com/hbm/explosion/ExplosionThermo.java b/com/hbm/explosion/ExplosionThermo.java index 0a4127800..8f9981f76 100644 --- a/com/hbm/explosion/ExplosionThermo.java +++ b/com/hbm/explosion/ExplosionThermo.java @@ -6,7 +6,6 @@ import java.util.List; import com.hbm.blocks.ModBlocks; import net.minecraft.block.Block; -import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntityOcelot; @@ -14,7 +13,6 @@ import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -275,20 +273,20 @@ public class ExplosionThermo { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength; + double d4 = entity.getDistance(x, y, z) / bombStartStrength; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat && !(entity instanceof EntityOcelot) && entity instanceof EntityLivingBase) { for(int a = (int) entity.posX - 2; a < (int) entity.posX + 1; a++) @@ -332,20 +330,20 @@ public class ExplosionThermo { int i2 = MathHelper.floor_double(y + wat + 1.0D); int l = MathHelper.floor_double(z - wat - 1.0D); int j2 = MathHelper.floor_double(z + wat + 1.0D); - List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2)); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); Vec3 vec3 = Vec3.createVectorHelper(x, y, z); for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity = (Entity)list.get(i1); - double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength; + double d4 = entity.getDistance(x, y, z) / bombStartStrength; if (d4 <= 1.0D) { d5 = entity.posX - x; - d6 = entity.posY + (double)entity.getEyeHeight() - y; + d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; - double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat && !(entity instanceof EntityOcelot) && entity instanceof EntityLivingBase) { diff --git a/com/hbm/gui/ContainerBombMulti.java b/com/hbm/gui/ContainerBombMulti.java index 25be53e03..e360442aa 100644 --- a/com/hbm/gui/ContainerBombMulti.java +++ b/com/hbm/gui/ContainerBombMulti.java @@ -7,7 +7,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityBombMulti; -import com.hbm.blocks.TileEntityNukeGadget; public class ContainerBombMulti extends Container { @@ -38,6 +37,7 @@ private TileEntityBombMulti bombMulti; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerCentrifuge.java b/com/hbm/gui/ContainerCentrifuge.java index 22a58489d..5c871f613 100644 --- a/com/hbm/gui/ContainerCentrifuge.java +++ b/com/hbm/gui/ContainerCentrifuge.java @@ -7,7 +7,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.hbm.blocks.TileEntityDiFurnace; import com.hbm.blocks.TileEntityMachineCentrifuge; public class ContainerCentrifuge extends Container { @@ -41,6 +40,7 @@ public class ContainerCentrifuge extends Container { } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -51,6 +51,7 @@ public class ContainerCentrifuge extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -73,6 +74,7 @@ public class ContainerCentrifuge extends Container { this.dualPower = this.diFurnace.dualPower; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerDiFurnace.java b/com/hbm/gui/ContainerDiFurnace.java index 23f04c9f8..e95c73589 100644 --- a/com/hbm/gui/ContainerDiFurnace.java +++ b/com/hbm/gui/ContainerDiFurnace.java @@ -8,8 +8,6 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; public class ContainerDiFurnace extends Container { @@ -44,6 +42,7 @@ public class ContainerDiFurnace extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); @@ -51,6 +50,7 @@ public class ContainerDiFurnace extends Container { /**=====We are entering the magic realm of broken shit.=====**/ } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { /*ItemStack itemstack = null; @@ -128,6 +128,7 @@ public class ContainerDiFurnace extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -150,6 +151,7 @@ public class ContainerDiFurnace extends Container { this.dualPower = this.diFurnace.dualPower; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerElectricFurnace.java b/com/hbm/gui/ContainerElectricFurnace.java index 74e7063eb..5ba255683 100644 --- a/com/hbm/gui/ContainerElectricFurnace.java +++ b/com/hbm/gui/ContainerElectricFurnace.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineElectricFurnace; -import com.hbm.blocks.TileEntityNukeFurnace; public class ContainerElectricFurnace extends Container { @@ -42,12 +41,14 @@ public class ContainerElectricFurnace extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); crafting.sendProgressBarUpdate(this, 1, this.diFurnace.power); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -58,6 +59,7 @@ public class ContainerElectricFurnace extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -80,6 +82,7 @@ public class ContainerElectricFurnace extends Container { this.dualPower = this.diFurnace.power; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerGenerator.java b/com/hbm/gui/ContainerGenerator.java index adb3f3315..cd0ded636 100644 --- a/com/hbm/gui/ContainerGenerator.java +++ b/com/hbm/gui/ContainerGenerator.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineGenerator; -import com.hbm.blocks.TileEntityRtgFurnace; public class ContainerGenerator extends Container { @@ -50,6 +49,7 @@ public class ContainerGenerator extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.water); @@ -58,6 +58,7 @@ public class ContainerGenerator extends Container { crafting.sendProgressBarUpdate(this, 3, this.diFurnace.heat); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -68,6 +69,7 @@ public class ContainerGenerator extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -102,6 +104,7 @@ public class ContainerGenerator extends Container { this.heat = this.diFurnace.heat; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerLaunchPadTier1.java b/com/hbm/gui/ContainerLaunchPadTier1.java index 6bd81c814..59d75d218 100644 --- a/com/hbm/gui/ContainerLaunchPadTier1.java +++ b/com/hbm/gui/ContainerLaunchPadTier1.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityLaunchPad; -import com.hbm.blocks.TileEntityMachineBattery; public class ContainerLaunchPadTier1 extends Container { @@ -38,11 +37,13 @@ public class ContainerLaunchPadTier1 extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -53,6 +54,7 @@ public class ContainerLaunchPadTier1 extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -69,6 +71,7 @@ public class ContainerLaunchPadTier1 extends Container { this.power = this.diFurnace.power; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerMachineBattery.java b/com/hbm/gui/ContainerMachineBattery.java index 5fabaaddd..e4537bf46 100644 --- a/com/hbm/gui/ContainerMachineBattery.java +++ b/com/hbm/gui/ContainerMachineBattery.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineBattery; -import com.hbm.blocks.TileEntityMachineElectricFurnace; public class ContainerMachineBattery extends Container { @@ -37,11 +36,13 @@ public class ContainerMachineBattery extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -52,6 +53,7 @@ public class ContainerMachineBattery extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -68,6 +70,7 @@ public class ContainerMachineBattery extends Container { this.power = this.diFurnace.power; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerMachineCoal.java b/com/hbm/gui/ContainerMachineCoal.java index bd4d656b4..b390e70b0 100644 --- a/com/hbm/gui/ContainerMachineCoal.java +++ b/com/hbm/gui/ContainerMachineCoal.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineCoal; -import com.hbm.blocks.TileEntityMachineElectricFurnace; public class ContainerMachineCoal extends Container { @@ -42,6 +41,7 @@ public class ContainerMachineCoal extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.water); @@ -49,6 +49,7 @@ public class ContainerMachineCoal extends Container { crafting.sendProgressBarUpdate(this, 2, this.diFurnace.burnTime); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -59,6 +60,7 @@ public class ContainerMachineCoal extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -87,6 +89,7 @@ public class ContainerMachineCoal extends Container { this.burnTime = this.diFurnace.burnTime; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerMachineDeuterium.java b/com/hbm/gui/ContainerMachineDeuterium.java index 997a08473..331384496 100644 --- a/com/hbm/gui/ContainerMachineDeuterium.java +++ b/com/hbm/gui/ContainerMachineDeuterium.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineDeuterium; -import com.hbm.blocks.TileEntityNukeBoy; public class ContainerMachineDeuterium extends Container { @@ -43,6 +42,7 @@ private TileEntityMachineDeuterium nukeBoy; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -53,6 +53,7 @@ private TileEntityMachineDeuterium nukeBoy; return nukeBoy.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -87,6 +88,7 @@ private TileEntityMachineDeuterium nukeBoy; this.sulfur = this.nukeBoy.sulfur; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerNukeBoy.java b/com/hbm/gui/ContainerNukeBoy.java index 73a56d1f1..25036777c 100644 --- a/com/hbm/gui/ContainerNukeBoy.java +++ b/com/hbm/gui/ContainerNukeBoy.java @@ -1,16 +1,11 @@ package com.hbm.gui; import com.hbm.blocks.TileEntityNukeBoy; -import com.hbm.blocks.TileEntityNukeGadget; -import com.hbm.blocks.TileEntityTestNuke; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; public class ContainerNukeBoy extends Container { @@ -40,6 +35,7 @@ private TileEntityNukeBoy nukeBoy; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukeFleija.java b/com/hbm/gui/ContainerNukeFleija.java index 940ead34b..7bd981415 100644 --- a/com/hbm/gui/ContainerNukeFleija.java +++ b/com/hbm/gui/ContainerNukeFleija.java @@ -7,7 +7,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityNukeFleija; -import com.hbm.blocks.TileEntityNukeTsar; public class ContainerNukeFleija extends Container { @@ -43,6 +42,7 @@ private TileEntityNukeFleija nukeTsar; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukeFurnace.java b/com/hbm/gui/ContainerNukeFurnace.java index 6ff11673a..c86661ac5 100644 --- a/com/hbm/gui/ContainerNukeFurnace.java +++ b/com/hbm/gui/ContainerNukeFurnace.java @@ -7,7 +7,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.hbm.blocks.TileEntityMachineReactor; import com.hbm.blocks.TileEntityNukeFurnace; public class ContainerNukeFurnace extends Container { @@ -42,12 +41,14 @@ public class ContainerNukeFurnace extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); crafting.sendProgressBarUpdate(this, 1, this.diFurnace.dualPower); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -58,6 +59,7 @@ public class ContainerNukeFurnace extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -80,6 +82,7 @@ public class ContainerNukeFurnace extends Container { this.dualPower = this.diFurnace.dualPower; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerNukeGadget.java b/com/hbm/gui/ContainerNukeGadget.java index cbb8ead9e..ebbcb5b70 100644 --- a/com/hbm/gui/ContainerNukeGadget.java +++ b/com/hbm/gui/ContainerNukeGadget.java @@ -1,15 +1,11 @@ package com.hbm.gui; import com.hbm.blocks.TileEntityNukeGadget; -import com.hbm.blocks.TileEntityTestNuke; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; public class ContainerNukeGadget extends Container { @@ -40,6 +36,7 @@ private TileEntityNukeGadget nukeGadget; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukeMan.java b/com/hbm/gui/ContainerNukeMan.java index 736d572d2..248fb254f 100644 --- a/com/hbm/gui/ContainerNukeMan.java +++ b/com/hbm/gui/ContainerNukeMan.java @@ -1,16 +1,11 @@ package com.hbm.gui; -import com.hbm.blocks.TileEntityNukeGadget; import com.hbm.blocks.TileEntityNukeMan; -import com.hbm.blocks.TileEntityTestNuke; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; public class ContainerNukeMan extends Container { @@ -41,6 +36,7 @@ private TileEntityNukeMan nukeMan; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukeMike.java b/com/hbm/gui/ContainerNukeMike.java index 2f9eea08d..2807252de 100644 --- a/com/hbm/gui/ContainerNukeMike.java +++ b/com/hbm/gui/ContainerNukeMike.java @@ -1,6 +1,5 @@ package com.hbm.gui; -import com.hbm.blocks.TileEntityNukeMan; import com.hbm.blocks.TileEntityNukeMike; import net.minecraft.entity.player.EntityPlayer; @@ -40,6 +39,7 @@ private TileEntityNukeMike nukeMike; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukePrototype.java b/com/hbm/gui/ContainerNukePrototype.java index f45c39d03..ba1f10cf7 100644 --- a/com/hbm/gui/ContainerNukePrototype.java +++ b/com/hbm/gui/ContainerNukePrototype.java @@ -6,7 +6,6 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.hbm.blocks.TileEntityNukeFleija; import com.hbm.blocks.TileEntityNukePrototype; public class ContainerNukePrototype extends Container { @@ -46,6 +45,7 @@ private TileEntityNukePrototype nukeTsar; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerNukeTsar.java b/com/hbm/gui/ContainerNukeTsar.java index 4b3f72f88..4ba150db6 100644 --- a/com/hbm/gui/ContainerNukeTsar.java +++ b/com/hbm/gui/ContainerNukeTsar.java @@ -37,6 +37,7 @@ private TileEntityNukeTsar nukeTsar; } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerPuF6Tank.java b/com/hbm/gui/ContainerPuF6Tank.java index 23dad76e2..102f06408 100644 --- a/com/hbm/gui/ContainerPuF6Tank.java +++ b/com/hbm/gui/ContainerPuF6Tank.java @@ -8,8 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachinePuF6Tank; -import com.hbm.blocks.TileEntityMachineUF6Tank; -import com.hbm.blocks.TileEntityTestNuke; public class ContainerPuF6Tank extends Container { @@ -40,11 +38,13 @@ public class ContainerPuF6Tank extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.testNuke.fillState); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -55,6 +55,7 @@ public class ContainerPuF6Tank extends Container { return testNuke.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -71,6 +72,7 @@ public class ContainerPuF6Tank extends Container { this.fillState = this.testNuke.fillState; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerReactor.java b/com/hbm/gui/ContainerReactor.java index 5f6b28775..d343b12cc 100644 --- a/com/hbm/gui/ContainerReactor.java +++ b/com/hbm/gui/ContainerReactor.java @@ -1,6 +1,5 @@ package com.hbm.gui; -import com.hbm.blocks.TileEntityDiFurnace; import com.hbm.blocks.TileEntityMachineReactor; import net.minecraft.entity.player.EntityPlayer; @@ -9,8 +8,6 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; public class ContainerReactor extends Container { @@ -44,12 +41,14 @@ public class ContainerReactor extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); crafting.sendProgressBarUpdate(this, 1, this.diFurnace.dualPower); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -60,6 +59,7 @@ public class ContainerReactor extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -82,6 +82,7 @@ public class ContainerReactor extends Container { this.dualPower = this.diFurnace.dualPower; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerRtgFurnace.java b/com/hbm/gui/ContainerRtgFurnace.java index e9f8f9af5..984141f12 100644 --- a/com/hbm/gui/ContainerRtgFurnace.java +++ b/com/hbm/gui/ContainerRtgFurnace.java @@ -7,7 +7,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.hbm.blocks.TileEntityNukeFurnace; import com.hbm.blocks.TileEntityRtgFurnace; public class ContainerRtgFurnace extends Container { @@ -42,11 +41,13 @@ public class ContainerRtgFurnace extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -57,6 +58,7 @@ public class ContainerRtgFurnace extends Container { return diFurnace.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -73,6 +75,7 @@ public class ContainerRtgFurnace extends Container { this.dualCookTime = this.diFurnace.dualCookTime; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/ContainerTestNuke.java b/com/hbm/gui/ContainerTestNuke.java index 2b5d2831c..c5cabad64 100644 --- a/com/hbm/gui/ContainerTestNuke.java +++ b/com/hbm/gui/ContainerTestNuke.java @@ -5,10 +5,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.tileentity.TileEntityFurnace; - -import com.hbm.blocks.TileEntityDiFurnace; import com.hbm.blocks.TileEntityTestNuke; public class ContainerTestNuke extends Container { @@ -39,6 +35,7 @@ public class ContainerTestNuke extends Container { } } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; diff --git a/com/hbm/gui/ContainerUF6Tank.java b/com/hbm/gui/ContainerUF6Tank.java index 306548aef..8d6cb58fd 100644 --- a/com/hbm/gui/ContainerUF6Tank.java +++ b/com/hbm/gui/ContainerUF6Tank.java @@ -8,7 +8,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.hbm.blocks.TileEntityMachineUF6Tank; -import com.hbm.blocks.TileEntityTestNuke; public class ContainerUF6Tank extends Container { @@ -39,11 +38,13 @@ public class ContainerUF6Tank extends Container { } } + @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); crafting.sendProgressBarUpdate(this, 0, this.testNuke.fillState); } + @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; @@ -54,6 +55,7 @@ public class ContainerUF6Tank extends Container { return testNuke.isUseableByPlayer(player); } + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); @@ -70,6 +72,7 @@ public class ContainerUF6Tank extends Container { this.fillState = this.testNuke.fillState; } + @Override public void updateProgressBar(int i, int j) { if(i == 0) { diff --git a/com/hbm/gui/GUIBombMulti.java b/com/hbm/gui/GUIBombMulti.java index 12a2c13a7..6c16f4fce 100644 --- a/com/hbm/gui/GUIBombMulti.java +++ b/com/hbm/gui/GUIBombMulti.java @@ -3,14 +3,12 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityBombMulti; -import com.hbm.blocks.TileEntityNukeGadget; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUIBombMulti extends GuiContainer { @@ -26,6 +24,7 @@ public class GUIBombMulti extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUILaunchPadTier1.java b/com/hbm/gui/GUILaunchPadTier1.java index 0575b4b84..a680d5428 100644 --- a/com/hbm/gui/GUILaunchPadTier1.java +++ b/com/hbm/gui/GUILaunchPadTier1.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityLaunchPad; -import com.hbm.blocks.TileEntityMachineBattery; import com.hbm.lib.RefStrings; public class GUILaunchPadTier1 extends GuiContainer { @@ -25,6 +24,7 @@ public class GUILaunchPadTier1 extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineBattery.java b/com/hbm/gui/GUIMachineBattery.java index f643ad48a..f951a5bad 100644 --- a/com/hbm/gui/GUIMachineBattery.java +++ b/com/hbm/gui/GUIMachineBattery.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineBattery; -import com.hbm.blocks.TileEntityMachineElectricFurnace; import com.hbm.lib.RefStrings; public class GUIMachineBattery extends GuiContainer { @@ -25,6 +24,7 @@ public class GUIMachineBattery extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineCentrifuge.java b/com/hbm/gui/GUIMachineCentrifuge.java index b9a971f8a..c331a0b77 100644 --- a/com/hbm/gui/GUIMachineCentrifuge.java +++ b/com/hbm/gui/GUIMachineCentrifuge.java @@ -3,14 +3,12 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineCentrifuge; -import com.hbm.blocks.TileEntityNukeBoy; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUIMachineCentrifuge extends GuiContainer { @@ -26,6 +24,7 @@ public class GUIMachineCentrifuge extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.centrifuge.hasCustomInventoryName() ? this.centrifuge.getInventoryName() : I18n.format(this.centrifuge.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineCoal.java b/com/hbm/gui/GUIMachineCoal.java index e60a728d1..3fea2db3a 100644 --- a/com/hbm/gui/GUIMachineCoal.java +++ b/com/hbm/gui/GUIMachineCoal.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineCoal; -import com.hbm.blocks.TileEntityMachineElectricFurnace; import com.hbm.lib.RefStrings; public class GUIMachineCoal extends GuiContainer { @@ -25,6 +24,7 @@ public class GUIMachineCoal extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineDeuterium.java b/com/hbm/gui/GUIMachineDeuterium.java index d5d016973..11dbd236a 100644 --- a/com/hbm/gui/GUIMachineDeuterium.java +++ b/com/hbm/gui/GUIMachineDeuterium.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineDeuterium; -import com.hbm.blocks.TileEntityMachineReactor; import com.hbm.lib.RefStrings; public class GUIMachineDeuterium extends GuiContainer { @@ -25,6 +24,7 @@ public class GUIMachineDeuterium extends GuiContainer { this.ySize = 222; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineElectricFurnace.java b/com/hbm/gui/GUIMachineElectricFurnace.java index 116976a02..404e6aba2 100644 --- a/com/hbm/gui/GUIMachineElectricFurnace.java +++ b/com/hbm/gui/GUIMachineElectricFurnace.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineElectricFurnace; -import com.hbm.blocks.TileEntityNukeFurnace; import com.hbm.lib.RefStrings; public class GUIMachineElectricFurnace extends GuiContainer { @@ -25,6 +24,7 @@ public class GUIMachineElectricFurnace extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineGenerator.java b/com/hbm/gui/GUIMachineGenerator.java index 3f43ce103..af252ee16 100644 --- a/com/hbm/gui/GUIMachineGenerator.java +++ b/com/hbm/gui/GUIMachineGenerator.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityMachineGenerator; -import com.hbm.blocks.TileEntityMachineReactor; import com.hbm.lib.RefStrings; public class GUIMachineGenerator extends GuiContainer { @@ -25,6 +24,7 @@ public class GUIMachineGenerator extends GuiContainer { this.ySize = 222; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachinePuF6Tank.java b/com/hbm/gui/GUIMachinePuF6Tank.java index 40f7ab806..c9fc8a792 100644 --- a/com/hbm/gui/GUIMachinePuF6Tank.java +++ b/com/hbm/gui/GUIMachinePuF6Tank.java @@ -2,17 +2,13 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityMachineCentrifuge; import com.hbm.blocks.TileEntityMachinePuF6Tank; -import com.hbm.blocks.TileEntityMachineUF6Tank; -import com.hbm.blocks.TileEntityNukeBoy; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUIMachinePuF6Tank extends GuiContainer { @@ -28,6 +24,7 @@ public class GUIMachinePuF6Tank extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.tank.hasCustomInventoryName() ? this.tank.getInventoryName() : I18n.format(this.tank.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineReactor.java b/com/hbm/gui/GUIMachineReactor.java index 6bc37b291..057194b5d 100644 --- a/com/hbm/gui/GUIMachineReactor.java +++ b/com/hbm/gui/GUIMachineReactor.java @@ -2,7 +2,6 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityDiFurnace; import com.hbm.blocks.TileEntityMachineReactor; import com.hbm.lib.RefStrings; @@ -10,7 +9,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUIMachineReactor extends GuiContainer { @@ -26,6 +24,7 @@ public class GUIMachineReactor extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUIMachineUF6Tank.java b/com/hbm/gui/GUIMachineUF6Tank.java index 6d90af597..548d6814a 100644 --- a/com/hbm/gui/GUIMachineUF6Tank.java +++ b/com/hbm/gui/GUIMachineUF6Tank.java @@ -2,16 +2,13 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityMachineCentrifuge; import com.hbm.blocks.TileEntityMachineUF6Tank; -import com.hbm.blocks.TileEntityNukeBoy; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUIMachineUF6Tank extends GuiContainer { @@ -27,6 +24,7 @@ public class GUIMachineUF6Tank extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.tank.hasCustomInventoryName() ? this.tank.getInventoryName() : I18n.format(this.tank.getInventoryName()); diff --git a/com/hbm/gui/GUINukeBoy.java b/com/hbm/gui/GUINukeBoy.java index d3662f701..a49d62003 100644 --- a/com/hbm/gui/GUINukeBoy.java +++ b/com/hbm/gui/GUINukeBoy.java @@ -3,14 +3,12 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityNukeBoy; -import com.hbm.blocks.TileEntityNukeGadget; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUINukeBoy extends GuiContainer { @@ -26,6 +24,7 @@ public class GUINukeBoy extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukeFleija.java b/com/hbm/gui/GUINukeFleija.java index 20b9f46f8..36e1d32e9 100644 --- a/com/hbm/gui/GUINukeFleija.java +++ b/com/hbm/gui/GUINukeFleija.java @@ -25,6 +25,7 @@ public class GUINukeFleija extends GuiContainer { this.ySize = 222; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukeFurnace.java b/com/hbm/gui/GUINukeFurnace.java index 37a9fc8f6..c89d77b8d 100644 --- a/com/hbm/gui/GUINukeFurnace.java +++ b/com/hbm/gui/GUINukeFurnace.java @@ -8,7 +8,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityMachineReactor; import com.hbm.blocks.TileEntityNukeFurnace; import com.hbm.lib.RefStrings; @@ -25,6 +24,7 @@ public class GUINukeFurnace extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUINukeGadget.java b/com/hbm/gui/GUINukeGadget.java index 3553545a2..446b3bdfc 100644 --- a/com/hbm/gui/GUINukeGadget.java +++ b/com/hbm/gui/GUINukeGadget.java @@ -9,7 +9,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityNukeGadget; -import com.hbm.blocks.TileEntityTestNuke; import com.hbm.lib.RefStrings; public class GUINukeGadget extends GuiContainer { @@ -25,6 +24,7 @@ public class GUINukeGadget extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukeMan.java b/com/hbm/gui/GUINukeMan.java index 8e3e10826..c30b01506 100644 --- a/com/hbm/gui/GUINukeMan.java +++ b/com/hbm/gui/GUINukeMan.java @@ -8,9 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityNukeGadget; import com.hbm.blocks.TileEntityNukeMan; -import com.hbm.blocks.TileEntityTestNuke; import com.hbm.lib.RefStrings; public class GUINukeMan extends GuiContainer { @@ -26,6 +24,7 @@ public class GUINukeMan extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukeMike.java b/com/hbm/gui/GUINukeMike.java index a6886ca8c..32d912306 100644 --- a/com/hbm/gui/GUINukeMike.java +++ b/com/hbm/gui/GUINukeMike.java @@ -2,7 +2,6 @@ package com.hbm.gui; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityNukeMan; import com.hbm.blocks.TileEntityNukeMike; import com.hbm.lib.RefStrings; @@ -25,6 +24,7 @@ public class GUINukeMike extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukePrototype.java b/com/hbm/gui/GUINukePrototype.java index 043d751d5..0b30ee95e 100644 --- a/com/hbm/gui/GUINukePrototype.java +++ b/com/hbm/gui/GUINukePrototype.java @@ -8,9 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityNukeFleija; import com.hbm.blocks.TileEntityNukePrototype; -import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; public class GUINukePrototype extends GuiContainer { @@ -26,6 +24,7 @@ public class GUINukePrototype extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUINukeTsar.java b/com/hbm/gui/GUINukeTsar.java index daa8b6cea..3e4f6f39b 100644 --- a/com/hbm/gui/GUINukeTsar.java +++ b/com/hbm/gui/GUINukeTsar.java @@ -8,7 +8,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityNukeMan; import com.hbm.blocks.TileEntityNukeTsar; import com.hbm.lib.RefStrings; @@ -25,6 +24,7 @@ public class GUINukeTsar extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/GUIRtgFurnace.java b/com/hbm/gui/GUIRtgFurnace.java index 6f8dc5a53..1a2f3df8e 100644 --- a/com/hbm/gui/GUIRtgFurnace.java +++ b/com/hbm/gui/GUIRtgFurnace.java @@ -24,6 +24,7 @@ public class GUIRtgFurnace extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUITestDiFurnace.java b/com/hbm/gui/GUITestDiFurnace.java index 47d15e704..5129fb3e8 100644 --- a/com/hbm/gui/GUITestDiFurnace.java +++ b/com/hbm/gui/GUITestDiFurnace.java @@ -9,7 +9,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class GUITestDiFurnace extends GuiContainer { @@ -25,6 +24,7 @@ public class GUITestDiFurnace extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); diff --git a/com/hbm/gui/GUITestNuke.java b/com/hbm/gui/GUITestNuke.java index 0d2be0826..028ed4ae4 100644 --- a/com/hbm/gui/GUITestNuke.java +++ b/com/hbm/gui/GUITestNuke.java @@ -8,7 +8,6 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import com.hbm.blocks.TileEntityDiFurnace; import com.hbm.blocks.TileEntityTestNuke; import com.hbm.lib.RefStrings; @@ -25,6 +24,7 @@ public class GUITestNuke extends GuiContainer { this.ySize = 166; } + @Override protected void drawGuiContainerForegroundLayer( int i, int j) { String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); diff --git a/com/hbm/gui/SlotDiFurnace.java b/com/hbm/gui/SlotDiFurnace.java index 33eb97c91..5fc32b9c4 100644 --- a/com/hbm/gui/SlotDiFurnace.java +++ b/com/hbm/gui/SlotDiFurnace.java @@ -1,7 +1,5 @@ package com.hbm.gui; -import com.hbm.blocks.TileEntityDiFurnace; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; @@ -13,6 +11,7 @@ public class SlotDiFurnace extends Slot { super(inventory, i, j, k); } + @Override public boolean isItemValid(ItemStack p_75214_1_) { return false; diff --git a/com/hbm/items/ArmorEuphemium.java b/com/hbm/items/ArmorEuphemium.java index 377eba629..c485fe347 100644 --- a/com/hbm/items/ArmorEuphemium.java +++ b/com/hbm/items/ArmorEuphemium.java @@ -6,15 +6,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; - import com.hbm.lib.RefStrings; public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { @@ -85,7 +82,8 @@ public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { } } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.epic; } diff --git a/com/hbm/items/ArmorModel.java b/com/hbm/items/ArmorModel.java index 6ec32e0ce..b8c60fbbe 100644 --- a/com/hbm/items/ArmorModel.java +++ b/com/hbm/items/ArmorModel.java @@ -6,13 +6,10 @@ import com.hbm.render.ModelGoggles; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; public class ArmorModel extends ItemArmor { @SideOnly(Side.CLIENT) @@ -24,12 +21,14 @@ public class ArmorModel extends ItemArmor { super(armorMaterial, renderIndex, armorType); } - public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) + @Override + public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { return armorType == 0; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(this == ModItems.goggles) @@ -55,7 +54,8 @@ public class ArmorModel extends ItemArmor { return null; } - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(stack.getItem() == ModItems.goggles) { diff --git a/com/hbm/items/ArmorSchrabidium.java b/com/hbm/items/ArmorSchrabidium.java index 9a5de4814..37820d39b 100644 --- a/com/hbm/items/ArmorSchrabidium.java +++ b/com/hbm/items/ArmorSchrabidium.java @@ -6,15 +6,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; - import com.hbm.lib.RefStrings; public class ArmorSchrabidium extends ItemArmor implements ISpecialArmor { @@ -36,7 +32,8 @@ public class ArmorSchrabidium extends ItemArmor implements ISpecialArmor { else return null; } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/ArmorT45.java b/com/hbm/items/ArmorT45.java index 6119e8535..eb0296bb7 100644 --- a/com/hbm/items/ArmorT45.java +++ b/com/hbm/items/ArmorT45.java @@ -3,8 +3,6 @@ package com.hbm.items; import java.util.List; import com.hbm.lib.Library; -import com.hbm.render.ModelGasMask; -import com.hbm.render.ModelGoggles; import com.hbm.render.ModelT45Boots; import com.hbm.render.ModelT45Chest; import com.hbm.render.ModelT45Helmet; @@ -16,21 +14,16 @@ import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; -import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.ISpecialArmor.ArmorProperties; public class ArmorT45 extends ItemArmor implements ISpecialArmor { @SideOnly(Side.CLIENT) @@ -44,7 +37,8 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor { super(armorMaterial, renderIndex, armorType); } - public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) + @Override + public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { if(stack.getItem() == ModItems.t45_helmet) return armorType == 0; @@ -57,7 +51,8 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor { return false; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(this == ModItems.t45_helmet) @@ -103,7 +98,8 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor { return null; } - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(stack.getItem() == ModItems.t45_helmet) { diff --git a/com/hbm/items/ArmorTest.java b/com/hbm/items/ArmorTest.java index 424fa27e6..8c959131b 100644 --- a/com/hbm/items/ArmorTest.java +++ b/com/hbm/items/ArmorTest.java @@ -4,7 +4,6 @@ import com.hbm.lib.RefStrings; import net.minecraft.entity.Entity; import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; public class ArmorTest extends ItemArmor { diff --git a/com/hbm/items/AxeSchrabidium.java b/com/hbm/items/AxeSchrabidium.java index f64beb00c..9402641f0 100644 --- a/com/hbm/items/AxeSchrabidium.java +++ b/com/hbm/items/AxeSchrabidium.java @@ -10,7 +10,8 @@ public class AxeSchrabidium extends ItemAxe { super(p_i45327_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/BigSword.java b/com/hbm/items/BigSword.java index b262ebcf7..0e9bc2e47 100644 --- a/com/hbm/items/BigSword.java +++ b/com/hbm/items/BigSword.java @@ -2,16 +2,7 @@ package com.hbm.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.Entity; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.Explosion; import net.minecraft.world.World; public class BigSword extends ItemSword { @@ -26,6 +17,7 @@ public class BigSword extends ItemSword { super(p_i45356_1_); } + @Override @SideOnly(Side.CLIENT) public boolean isFull3D() { diff --git a/com/hbm/items/GunRevolver.java b/com/hbm/items/GunRevolver.java index 546615ba3..842c321bb 100644 --- a/com/hbm/items/GunRevolver.java +++ b/com/hbm/items/GunRevolver.java @@ -64,7 +64,8 @@ public class GunRevolver extends Item this.instakill = instakill; } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.gun_revolver_schrabidium) { @@ -82,7 +83,8 @@ public class GunRevolver extends Item /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ - public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; @@ -99,10 +101,10 @@ public class GunRevolver extends Item if (flag || p_77615_3_.inventory.hasItem(ammo)) { - float f = (float)j / 20.0F; + float f = j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; - if ((double)j < 10.0D) + if (j < 10.0D) { return; } @@ -151,7 +153,8 @@ public class GunRevolver extends Item } } - public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { return p_77654_1_; } @@ -159,7 +162,8 @@ public class GunRevolver extends Item /** * How long it takes to use or consume an item */ - public int getMaxItemUseDuration(ItemStack p_77626_1_) + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 72000; } @@ -167,7 +171,8 @@ public class GunRevolver extends Item /** * returns the action that specifies what animation to play when the items is being used */ - public EnumAction getItemUseAction(ItemStack p_77661_1_) + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.bow; } @@ -175,7 +180,8 @@ public class GunRevolver extends Item /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + @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); @@ -195,7 +201,8 @@ public class GunRevolver extends Item /** * Return the enchantability factor of the item, most of the time is based on material. */ - public int getItemEnchantability() + @Override + public int getItemEnchantability() { return 1; } diff --git a/com/hbm/items/GunRpg.java b/com/hbm/items/GunRpg.java index ac68b8334..e29c00ea0 100644 --- a/com/hbm/items/GunRpg.java +++ b/com/hbm/items/GunRpg.java @@ -4,13 +4,9 @@ import com.hbm.entity.EntityRocket; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -36,7 +32,8 @@ public class GunRpg extends Item /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ - public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; @@ -52,10 +49,10 @@ public class GunRpg extends Item if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_rpg_ammo)) { - float f = (float)j / 20.0F; + float f = j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; - if ((double)j < 25.0D) + if (j < 25.0D) { return; } @@ -91,7 +88,8 @@ public class GunRpg extends Item } } - public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { return p_77654_1_; } @@ -99,7 +97,8 @@ public class GunRpg extends Item /** * How long it takes to use or consume an item */ - public int getMaxItemUseDuration(ItemStack p_77626_1_) + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 72000; } @@ -107,7 +106,8 @@ public class GunRpg extends Item /** * returns the action that specifies what animation to play when the items is being used */ - public EnumAction getItemUseAction(ItemStack p_77661_1_) + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.bow; } @@ -115,7 +115,8 @@ public class GunRpg extends Item /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + @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); @@ -135,7 +136,8 @@ public class GunRpg extends Item /** * Return the enchantability factor of the item, most of the time is based on material. */ - public int getItemEnchantability() + @Override + public int getItemEnchantability() { return 1; } diff --git a/com/hbm/items/HoeSchrabidium.java b/com/hbm/items/HoeSchrabidium.java index ccd4bb621..c96a29052 100644 --- a/com/hbm/items/HoeSchrabidium.java +++ b/com/hbm/items/HoeSchrabidium.java @@ -10,7 +10,8 @@ public class HoeSchrabidium extends ItemHoe { super(p_i45343_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/ItemAppleEuphemium.java b/com/hbm/items/ItemAppleEuphemium.java index 7caf19f20..f05b0a8c5 100644 --- a/com/hbm/items/ItemAppleEuphemium.java +++ b/com/hbm/items/ItemAppleEuphemium.java @@ -18,13 +18,15 @@ public class ItemAppleEuphemium extends ItemFood { this.setCreativeTab(null); } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack p_77636_1_) { return true; } - protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) + @Override + protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) { if (!p_77849_2_.isRemote) { @@ -34,7 +36,8 @@ public class ItemAppleEuphemium extends ItemFood { } } - public EnumRarity getRarity(ItemStack p_77613_1_) + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.epic; } diff --git a/com/hbm/items/ItemAppleSchrabidium.java b/com/hbm/items/ItemAppleSchrabidium.java index f506a7978..97cfa2409 100644 --- a/com/hbm/items/ItemAppleSchrabidium.java +++ b/com/hbm/items/ItemAppleSchrabidium.java @@ -22,13 +22,15 @@ public class ItemAppleSchrabidium extends ItemFood { this.setAlwaysEdible(); } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack p_77636_1_) { return p_77636_1_.getItemDamage() == 2; } - protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) + @Override + protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) { if (!p_77849_2_.isRemote) { @@ -76,7 +78,8 @@ public class ItemAppleSchrabidium extends ItemFood { } } - public EnumRarity getRarity(ItemStack p_77613_1_) + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(p_77613_1_.getItemDamage() == 0) { @@ -96,7 +99,8 @@ public class ItemAppleSchrabidium extends ItemFood { return EnumRarity.common; } - @SideOnly(Side.CLIENT) + @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)); diff --git a/com/hbm/items/ItemBattery.java b/com/hbm/items/ItemBattery.java index f844e97db..40b25d4d1 100644 --- a/com/hbm/items/ItemBattery.java +++ b/com/hbm/items/ItemBattery.java @@ -24,7 +24,8 @@ public class ItemBattery extends Item { } } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.battery_schrabidium) { diff --git a/com/hbm/items/ItemCottonCandy.java b/com/hbm/items/ItemCottonCandy.java index f2ab635dc..ddc7cfe4b 100644 --- a/com/hbm/items/ItemCottonCandy.java +++ b/com/hbm/items/ItemCottonCandy.java @@ -14,7 +14,8 @@ public class ItemCottonCandy extends ItemFood { this.setAlwaysEdible(); } - protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) + @Override + protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) { if (!p_77849_2_.isRemote) { diff --git a/com/hbm/items/ItemCustomLore.java b/com/hbm/items/ItemCustomLore.java index 593831b8e..ebd1d60dc 100644 --- a/com/hbm/items/ItemCustomLore.java +++ b/com/hbm/items/ItemCustomLore.java @@ -292,7 +292,8 @@ public class ItemCustomLore extends Item { } } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.nugget_euphemium || this == ModItems.ingot_euphemium || this == ModItems.rod_quad_euphemium || this == ModItems.watch) { diff --git a/com/hbm/items/ItemDesingator.java b/com/hbm/items/ItemDesingator.java index 299c280d6..abba93d83 100644 --- a/com/hbm/items/ItemDesingator.java +++ b/com/hbm/items/ItemDesingator.java @@ -12,7 +12,8 @@ import net.minecraft.world.World; public class ItemDesingator extends Item { - public void onCreated(ItemStack p_77622_1_, World p_77622_2_, EntityPlayer p_77622_3_) { + @Override + public void onCreated(ItemStack p_77622_1_, World p_77622_2_, EntityPlayer p_77622_3_) { p_77622_1_.stackTagCompound = new NBTTagCompound(); p_77622_1_.stackTagCompound.setInteger("xCoord", 0); p_77622_1_.stackTagCompound.setInteger("zCoord", 0); diff --git a/com/hbm/items/ItemFleija.java b/com/hbm/items/ItemFleija.java index e33d248d4..49a274736 100644 --- a/com/hbm/items/ItemFleija.java +++ b/com/hbm/items/ItemFleija.java @@ -16,7 +16,8 @@ public class ItemFleija extends Item{ list.add("F.L.E.I.J.A."); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.fleija_propellant) { diff --git a/com/hbm/items/ItemGrenade.java b/com/hbm/items/ItemGrenade.java index 46ac52569..95f3fec36 100644 --- a/com/hbm/items/ItemGrenade.java +++ b/com/hbm/items/ItemGrenade.java @@ -12,9 +12,7 @@ import com.hbm.entity.EntityGrenadePoison; import com.hbm.entity.EntityGrenadeSchrabidium; import com.hbm.entity.EntityGrenadeStrong; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -27,7 +25,8 @@ public class ItemGrenade extends Item { this.maxStackSize = 16; } - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { if (!p_77659_3_.capabilities.isCreativeMode) { @@ -91,7 +90,8 @@ public class ItemGrenade extends Item { return p_77659_1_; } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.grenade_schrabidium) { diff --git a/com/hbm/items/ItemSchnitzelVegan.java b/com/hbm/items/ItemSchnitzelVegan.java index f5f6ca0af..b11a52a67 100644 --- a/com/hbm/items/ItemSchnitzelVegan.java +++ b/com/hbm/items/ItemSchnitzelVegan.java @@ -5,7 +5,6 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; public class ItemSchnitzelVegan extends ItemFood { diff --git a/com/hbm/items/ItemSchrabidiumBlock.java b/com/hbm/items/ItemSchrabidiumBlock.java index 001ff4bcd..a0a87abda 100644 --- a/com/hbm/items/ItemSchrabidiumBlock.java +++ b/com/hbm/items/ItemSchrabidiumBlock.java @@ -11,7 +11,8 @@ public class ItemSchrabidiumBlock extends ItemBlock { super(p_i45328_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/ItemStarterKit.java b/com/hbm/items/ItemStarterKit.java index 83bcd8edb..124e1d8c7 100644 --- a/com/hbm/items/ItemStarterKit.java +++ b/com/hbm/items/ItemStarterKit.java @@ -17,6 +17,7 @@ public class ItemStarterKit extends Item { this.setMaxDamage(1); } + @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { stack.damageItem(5, player); @@ -272,7 +273,8 @@ public class ItemStarterKit extends Item { } - public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int i) { + @Override + public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int i) { } diff --git a/com/hbm/items/ItemSyringe.java b/com/hbm/items/ItemSyringe.java index 6379d0942..7bd1707e6 100644 --- a/com/hbm/items/ItemSyringe.java +++ b/com/hbm/items/ItemSyringe.java @@ -3,7 +3,6 @@ package com.hbm.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -13,6 +12,7 @@ import net.minecraft.world.World; public class ItemSyringe extends Item { + @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { if(this == ModItems.syringe_antidote) @@ -87,7 +87,8 @@ public class ItemSyringe extends Item { return stack; } - @SideOnly(Side.CLIENT) + @Override + @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack p_77636_1_) { if(this == ModItems.syringe_awesome) @@ -98,7 +99,8 @@ public class ItemSyringe extends Item { return false; } - public EnumRarity getRarity(ItemStack p_77613_1_) + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.syringe_awesome) { diff --git a/com/hbm/items/MaskOfInfamy.java b/com/hbm/items/MaskOfInfamy.java index e31e5b20a..9b3d8acf8 100644 --- a/com/hbm/items/MaskOfInfamy.java +++ b/com/hbm/items/MaskOfInfamy.java @@ -3,12 +3,8 @@ package com.hbm.items; import com.hbm.lib.RefStrings; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraftforge.common.ISpecialArmor; public class MaskOfInfamy extends ItemArmor { diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index b0ec1c867..f61fce997 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -3,17 +3,11 @@ package com.hbm.items; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemHoe; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemSpade; public class ModItems { diff --git a/com/hbm/items/PickaxeSchrabidium.java b/com/hbm/items/PickaxeSchrabidium.java index d13b193cf..a92aca33f 100644 --- a/com/hbm/items/PickaxeSchrabidium.java +++ b/com/hbm/items/PickaxeSchrabidium.java @@ -10,7 +10,8 @@ public class PickaxeSchrabidium extends ItemPickaxe { super(p_i45347_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/RedstoneSword.java b/com/hbm/items/RedstoneSword.java index 3dd6f21a1..56ede2b68 100644 --- a/com/hbm/items/RedstoneSword.java +++ b/com/hbm/items/RedstoneSword.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.world.World; @@ -17,12 +16,14 @@ public class RedstoneSword extends ItemSword { super(p_i45356_1_); } + @Override @SideOnly(Side.CLIENT) public boolean isFull3D() { return true; } + @Override public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { if (p_77648_7_ == 0) @@ -63,7 +64,7 @@ public class RedstoneSword extends ItemSword { { if (world.isAirBlock(x, y, z)) { - world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "random.break", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.break", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); world.setBlock(x, y, z, Blocks.redstone_wire); } diff --git a/com/hbm/items/SpadeSchrabidium.java b/com/hbm/items/SpadeSchrabidium.java index da14d5324..430262830 100644 --- a/com/hbm/items/SpadeSchrabidium.java +++ b/com/hbm/items/SpadeSchrabidium.java @@ -10,7 +10,8 @@ public class SpadeSchrabidium extends ItemSpade { super(p_i45353_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/items/SwordSchrabidium.java b/com/hbm/items/SwordSchrabidium.java index 0d4ff29ff..afe2ce026 100644 --- a/com/hbm/items/SwordSchrabidium.java +++ b/com/hbm/items/SwordSchrabidium.java @@ -10,7 +10,8 @@ public class SwordSchrabidium extends ItemSword { super(p_i45356_1_); } - public EnumRarity getRarity(ItemStack p_77613_1_) { + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { return EnumRarity.rare; } diff --git a/com/hbm/lib/HbmWorld.java b/com/hbm/lib/HbmWorld.java index a9748f014..cafd9f5ba 100644 --- a/com/hbm/lib/HbmWorld.java +++ b/com/hbm/lib/HbmWorld.java @@ -16,7 +16,7 @@ public class HbmWorld { public static void registerWorldGen(HbmWorldGen nukerWorldGen, int weightedProbability) { - GameRegistry.registerWorldGenerator((IWorldGenerator) nukerWorldGen, weightedProbability); + GameRegistry.registerWorldGenerator(nukerWorldGen, weightedProbability); } } diff --git a/com/hbm/lib/HbmWorldGen.java b/com/hbm/lib/HbmWorldGen.java index df5201bb2..51bfa87ce 100644 --- a/com/hbm/lib/HbmWorldGen.java +++ b/com/hbm/lib/HbmWorldGen.java @@ -9,9 +9,6 @@ import com.hbm.world.DesertAtom001; import com.hbm.world.Radio01; import com.hbm.world.Vertibird; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.IChunkProvider; diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 6cb56f46e..8b55046fd 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -9,7 +9,6 @@ import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -181,39 +180,39 @@ public class Library { entity instanceof TileEntityMachineBattery || entity instanceof TileEntityLaunchPad) { - if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower && TileEntityWireCoated.power >= 100) + if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower && TileEntityWireCoated.power >= 100) { ((TileEntityMachineElectricFurnace)entity).power += 100; if(that instanceof TileEntityWireCoated) { - ((TileEntityWireCoated)that).power -= 100; + TileEntityWireCoated.power -= 100; } } else - if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower && TileEntityWireCoated.power >= 100) + if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && TileEntityWireCoated.power >= 100) { - ((TileEntityWireCoated)entity).power += 100; + TileEntityWireCoated.power += 100; if(that instanceof TileEntityWireCoated) { - ((TileEntityWireCoated)that).power -= 100; + TileEntityWireCoated.power -= 100; } } else - if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower && TileEntityWireCoated.power >= 100) + if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower && TileEntityWireCoated.power >= 100) { ((TileEntityMachineDeuterium)entity).power += 100; if(that instanceof TileEntityWireCoated) { - ((TileEntityWireCoated)that).power -= 100; + TileEntityWireCoated.power -= 100; } } else if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts && TileEntityWireCoated.power >= 100) { ((TileEntityMachineBattery)entity).power += 100; if(that instanceof TileEntityWireCoated) { - ((TileEntityWireCoated)that).power -= 100; + TileEntityWireCoated.power -= 100; } } else if(entity instanceof TileEntityLaunchPad && ((TileEntityLaunchPad)entity).power + 100 <= ((TileEntityLaunchPad)entity).maxPower && TileEntityWireCoated.power >= 100) { ((TileEntityLaunchPad)entity).power += 100; if(that instanceof TileEntityWireCoated) { - ((TileEntityWireCoated)that).power -= 100; + TileEntityWireCoated.power -= 100; } } } diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index d44203f8d..3be9fd7c6 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -1,10 +1,6 @@ package com.hbm.main; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.entity.RenderCreeper; import net.minecraft.client.renderer.entity.RenderSnowball; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; @@ -69,7 +65,6 @@ import com.hbm.entity.EntityMissileRain; import com.hbm.entity.EntityMissileStrong; import com.hbm.entity.EntityNuclearCreeper; import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; import com.hbm.entity.EntityRocket; import com.hbm.entity.EntitySchrab; import com.hbm.entity.EntityTestMissile; @@ -78,7 +73,6 @@ import com.hbm.render.ItemRenderRevolverCursed; import com.hbm.render.ItemRenderRevolverIron; import com.hbm.render.ItemRenderBigSword; import com.hbm.render.ItemRenderDecoBlock; -import com.hbm.render.ItemRenderNukeGadget; import com.hbm.render.ItemRenderPoleTop; import com.hbm.render.ItemRenderRedstoneSword; import com.hbm.render.ItemRenderRevolver; @@ -92,7 +86,6 @@ import com.hbm.render.ItemRenderTapeRecorder; import com.hbm.render.ItemRenderTestBombAdvanced; import com.hbm.render.ItemRenderTestContainer; import com.hbm.render.RenderBombMulti; -import com.hbm.render.RenderBombMultiLarge; import com.hbm.render.RenderCentrifuge; import com.hbm.render.RenderDecoBlock; import com.hbm.render.RenderDecoBlockAlt; @@ -119,7 +112,6 @@ import com.hbm.render.RenderPuF6Tank; import com.hbm.render.RenderRedBarrel; import com.hbm.render.RenderRocket; import com.hbm.render.RenderRotationTester; -import com.hbm.render.RenderSmallNuke; import com.hbm.render.RenderSmallNukeAlt; import com.hbm.render.RenderSteelPoles; import com.hbm.render.RenderTapeRecorder; @@ -136,6 +128,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends ServerProxy { + @Override public void registerRenderInfo() { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestRender.class, new RenderTestRender()); @@ -260,6 +253,7 @@ public class ClientProxy extends ServerProxy RenderingRegistry.addNewArmourRendererPrefix("9"); } + @Override public void registerTileEntitySpecialRenderer() { } diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index a053b6508..18d487ed5 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -3,7 +3,6 @@ package com.hbm.main; import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; -import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; diff --git a/com/hbm/main/GUIHandler.java b/com/hbm/main/GUIHandler.java index a78d83950..d1d6167dd 100644 --- a/com/hbm/main/GUIHandler.java +++ b/com/hbm/main/GUIHandler.java @@ -69,7 +69,6 @@ import com.hbm.gui.GUITestDiFurnace; import com.hbm.gui.GUITestNuke; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.network.IGuiHandler; diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index c5fa7cc46..5a26f0691 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -3,8 +3,6 @@ package com.hbm.main; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.stats.Achievement; -import net.minecraftforge.common.AchievementPage; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; @@ -94,8 +92,6 @@ import com.hbm.entity.EntityTestMissile; import com.hbm.items.ModItems; import com.hbm.lib.HbmWorld; import com.hbm.lib.RefStrings; -import com.hbm.particles.NukeSmokeFX; - import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; diff --git a/com/hbm/main/ModEventHandler.java b/com/hbm/main/ModEventHandler.java index a4618539f..885c7ee59 100644 --- a/com/hbm/main/ModEventHandler.java +++ b/com/hbm/main/ModEventHandler.java @@ -1,10 +1,5 @@ package com.hbm.main; -import com.hbm.items.ModItems; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; - public class ModEventHandler { // Achievements diff --git a/com/hbm/particles/NukeCloudFX.java b/com/hbm/particles/NukeCloudFX.java index 30d2de093..7e94c0d7a 100644 --- a/com/hbm/particles/NukeCloudFX.java +++ b/com/hbm/particles/NukeCloudFX.java @@ -1,8 +1,6 @@ package com.hbm.particles; -import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.EntitySmokeFX; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.World; public class NukeCloudFX extends EntitySmokeFX { diff --git a/com/hbm/particles/NukeSmokeFX.java b/com/hbm/particles/NukeSmokeFX.java index d0e7cc615..29125b822 100644 --- a/com/hbm/particles/NukeSmokeFX.java +++ b/com/hbm/particles/NukeSmokeFX.java @@ -1,7 +1,6 @@ package com.hbm.particles; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -54,6 +53,7 @@ public class NukeSmokeFX extends EntityFX{ super(w, xp, yp, zp); } + @Override public void renderParticle(Tessellator tess, float par2, float par3, float par4, float par5, float par6, float par7){ GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false); @@ -68,10 +68,10 @@ public class NukeSmokeFX extends EntityFX{ tess.startDrawingQuads(); tess.setColorRGBA_F((float)this.r_e, (float)this.g_e, (float)this.b_e, (float)this.opacity_e); tess.setBrightness(/*240*/500); - tess.addVertexWithUV((double)(x-par3*PScale-par6*PScale), (double)(y-par4*PScale), (double)(z-par5*PScale-par7*PScale), 0, 0); - tess.addVertexWithUV((double)(x-par3*PScale+par6*PScale), (double)(y+par4*PScale), (double)(z-par5*PScale+par7*PScale), 1, 0); - tess.addVertexWithUV((double)(x+par3*PScale+par6*PScale), (double)(y+par4*PScale), (double)(z+par5*PScale+par7*PScale), 1, 1); - tess.addVertexWithUV((double)(x+par3*PScale-par6*PScale), (double)(y-par4*PScale), (double)(z+par5*PScale-par7*PScale), 0, 1); + tess.addVertexWithUV(x-par3*PScale-par6*PScale, y-par4*PScale, z-par5*PScale-par7*PScale, 0, 0); + tess.addVertexWithUV(x-par3*PScale+par6*PScale, y+par4*PScale, z-par5*PScale+par7*PScale, 1, 0); + tess.addVertexWithUV(x+par3*PScale+par6*PScale, y+par4*PScale, z+par5*PScale+par7*PScale, 1, 1); + tess.addVertexWithUV(x+par3*PScale-par6*PScale, y-par4*PScale, z+par5*PScale-par7*PScale, 0, 1); tess.draw(); GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true); @@ -79,8 +79,10 @@ public class NukeSmokeFX extends EntityFX{ GL11.glEnable(GL11.GL_LIGHTING); } + @Override public int getFXLayer(){return 3;} + @Override public void onUpdate(){ if(particleAge>particleMaxAge)this.setDead(); if(Minecraft.getMinecraft().gameSettings.particleSetting==2)this.setDead(); @@ -88,7 +90,7 @@ public class NukeSmokeFX extends EntityFX{ if(worldObj.isRemote)this.motionHandeler(); //this.particleScale-=(float)particleMaxAge/10.0; - this.particleScale += (float)particleMaxAge/2.5; + this.particleScale += particleMaxAge/2.5; if(this.isDead){ diff --git a/com/hbm/render/ItemRenderDecoBlock.java b/com/hbm/render/ItemRenderDecoBlock.java index 973922f5b..c842e349a 100644 --- a/com/hbm/render/ItemRenderDecoBlock.java +++ b/com/hbm/render/ItemRenderDecoBlock.java @@ -11,8 +11,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderDecoBlock implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderNukeGadget.java b/com/hbm/render/ItemRenderNukeGadget.java index 9aa629987..f0cb9d950 100644 --- a/com/hbm/render/ItemRenderNukeGadget.java +++ b/com/hbm/render/ItemRenderNukeGadget.java @@ -5,12 +5,9 @@ import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; diff --git a/com/hbm/render/ItemRenderPoleTop.java b/com/hbm/render/ItemRenderPoleTop.java index cf3bce267..868b47464 100644 --- a/com/hbm/render/ItemRenderPoleTop.java +++ b/com/hbm/render/ItemRenderPoleTop.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderPoleTop implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRevolver.java b/com/hbm/render/ItemRenderRevolver.java index bf39a092c..32e75dec7 100644 --- a/com/hbm/render/ItemRenderRevolver.java +++ b/com/hbm/render/ItemRenderRevolver.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRevolver implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRevolverCursed.java b/com/hbm/render/ItemRenderRevolverCursed.java index 6467cca6a..87b65b299 100644 --- a/com/hbm/render/ItemRenderRevolverCursed.java +++ b/com/hbm/render/ItemRenderRevolverCursed.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRevolverCursed implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRevolverGold.java b/com/hbm/render/ItemRenderRevolverGold.java index 6a83cb29e..dea2930da 100644 --- a/com/hbm/render/ItemRenderRevolverGold.java +++ b/com/hbm/render/ItemRenderRevolverGold.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRevolverGold implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRevolverIron.java b/com/hbm/render/ItemRenderRevolverIron.java index 81c30de4b..be32a1c90 100644 --- a/com/hbm/render/ItemRenderRevolverIron.java +++ b/com/hbm/render/ItemRenderRevolverIron.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRevolverIron implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRevolverSchrabidium.java b/com/hbm/render/ItemRenderRevolverSchrabidium.java index f3dda9d79..9f1c19c4e 100644 --- a/com/hbm/render/ItemRenderRevolverSchrabidium.java +++ b/com/hbm/render/ItemRenderRevolverSchrabidium.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRevolverSchrabidium implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRocket.java b/com/hbm/render/ItemRenderRocket.java index dc5194324..e1ba03cdf 100644 --- a/com/hbm/render/ItemRenderRocket.java +++ b/com/hbm/render/ItemRenderRocket.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRocket implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderRpg.java b/com/hbm/render/ItemRenderRpg.java index d55afd377..f7e151ee2 100644 --- a/com/hbm/render/ItemRenderRpg.java +++ b/com/hbm/render/ItemRenderRpg.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderRpg implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderSatelliteReceiver.java b/com/hbm/render/ItemRenderSatelliteReceiver.java index f59757b96..c14eb83e1 100644 --- a/com/hbm/render/ItemRenderSatelliteReceiver.java +++ b/com/hbm/render/ItemRenderSatelliteReceiver.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderSatelliteReceiver implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderSteelPoles.java b/com/hbm/render/ItemRenderSteelPoles.java index aca9b3c34..3c37ca48d 100644 --- a/com/hbm/render/ItemRenderSteelPoles.java +++ b/com/hbm/render/ItemRenderSteelPoles.java @@ -2,18 +2,13 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityDecoSteelPoles; -import com.hbm.blocks.TileEntityTestBombAdvanced; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderSteelPoles implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderTapeRecorder.java b/com/hbm/render/ItemRenderTapeRecorder.java index 4210231af..ecce0577c 100644 --- a/com/hbm/render/ItemRenderTapeRecorder.java +++ b/com/hbm/render/ItemRenderTapeRecorder.java @@ -9,8 +9,6 @@ import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.IItemRenderer.ItemRenderType; -import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; public class ItemRenderTapeRecorder implements IItemRenderer { diff --git a/com/hbm/render/ItemRenderTestBombAdvanced.java b/com/hbm/render/ItemRenderTestBombAdvanced.java index abae60765..72c39beb2 100644 --- a/com/hbm/render/ItemRenderTestBombAdvanced.java +++ b/com/hbm/render/ItemRenderTestBombAdvanced.java @@ -3,13 +3,10 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityTestBombAdvanced; -import com.hbm.blocks.TileEntityTestContainer; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelChest; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; diff --git a/com/hbm/render/ModelBigSword.java b/com/hbm/render/ModelBigSword.java index 22e0d0df5..db06b1b84 100644 --- a/com/hbm/render/ModelBigSword.java +++ b/com/hbm/render/ModelBigSword.java @@ -68,7 +68,8 @@ public class ModelBigSword extends ModelBase setRotation(SBladeTip, -0.7853982F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -87,7 +88,8 @@ public class ModelBigSword extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelGasMask.java b/com/hbm/render/ModelGasMask.java index be199d1d1..608c934e4 100644 --- a/com/hbm/render/ModelGasMask.java +++ b/com/hbm/render/ModelGasMask.java @@ -13,7 +13,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; @@ -80,7 +79,8 @@ public class ModelGasMask extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.mask.rotationPointX = 0.0F; @@ -88,7 +88,8 @@ public class ModelGasMask extends ModelBiped this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleX = this.bipedHead.rotateAngleX; } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelGoggles.java b/com/hbm/render/ModelGoggles.java index 6f3ad63ec..57178251b 100644 --- a/com/hbm/render/ModelGoggles.java +++ b/com/hbm/render/ModelGoggles.java @@ -13,7 +13,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; @@ -84,7 +83,8 @@ public class ModelGoggles extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.google.rotationPointX = 0.0F; @@ -92,7 +92,8 @@ public class ModelGoggles extends ModelBiped this.google.rotateAngleY = this.bipedHead.rotateAngleY; this.google.rotateAngleX = this.bipedHead.rotateAngleX; } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelGun.java b/com/hbm/render/ModelGun.java index 62d7c0568..f441558cf 100644 --- a/com/hbm/render/ModelGun.java +++ b/com/hbm/render/ModelGun.java @@ -140,7 +140,8 @@ public class ModelGun extends ModelBase setRotation(Shape16, 0F, 0F, 0.2617994F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -188,7 +189,8 @@ public class ModelGun extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelPoleTop.java b/com/hbm/render/ModelPoleTop.java index 340f7704c..b7c563d2a 100644 --- a/com/hbm/render/ModelPoleTop.java +++ b/com/hbm/render/ModelPoleTop.java @@ -68,7 +68,8 @@ public class ModelPoleTop extends ModelBase setRotation(Shape6, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -97,7 +98,8 @@ public class ModelPoleTop extends ModelBase Shape6.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelPoles.java b/com/hbm/render/ModelPoles.java index 387b1ce05..c327ec84b 100644 --- a/com/hbm/render/ModelPoles.java +++ b/com/hbm/render/ModelPoles.java @@ -89,7 +89,8 @@ public class ModelPoles extends ModelBase setRotation(Shape9, 0.7853982F, -0.4886922F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -124,7 +125,8 @@ public class ModelPoles extends ModelBase Shape9.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelRPG.java b/com/hbm/render/ModelRPG.java index 333abadd3..12ef72b00 100644 --- a/com/hbm/render/ModelRPG.java +++ b/com/hbm/render/ModelRPG.java @@ -89,7 +89,8 @@ public class ModelRPG extends ModelBase setRotation(Shape9, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -123,7 +124,8 @@ public class ModelRPG extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelRevolver.java b/com/hbm/render/ModelRevolver.java index b8234459a..4407a30a1 100644 --- a/com/hbm/render/ModelRevolver.java +++ b/com/hbm/render/ModelRevolver.java @@ -110,7 +110,8 @@ public class ModelRevolver extends ModelBase setRotation(Shape12, 0F, 0F, 0.5235988F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -150,7 +151,8 @@ public class ModelRevolver extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelRocket.java b/com/hbm/render/ModelRocket.java index 0dad44eee..0666df9ea 100644 --- a/com/hbm/render/ModelRocket.java +++ b/com/hbm/render/ModelRocket.java @@ -47,7 +47,8 @@ public class ModelRocket extends ModelBase setRotation(Shape9, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -63,7 +64,8 @@ public class ModelRocket extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelRotationTester.java b/com/hbm/render/ModelRotationTester.java index aa89fbcee..ddefcbc8a 100644 --- a/com/hbm/render/ModelRotationTester.java +++ b/com/hbm/render/ModelRotationTester.java @@ -40,7 +40,8 @@ public class ModelRotationTester extends ModelBase setRotation(Shape2, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -60,7 +61,8 @@ public class ModelRotationTester extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSatelliteReceiver.java b/com/hbm/render/ModelSatelliteReceiver.java index 35e7cf857..8185e4ff0 100644 --- a/com/hbm/render/ModelSatelliteReceiver.java +++ b/com/hbm/render/ModelSatelliteReceiver.java @@ -89,7 +89,8 @@ public class ModelSatelliteReceiver extends ModelBase setRotation(Shape9, -0.2617994F, -0.4363323F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -124,7 +125,8 @@ public class ModelSatelliteReceiver extends ModelBase Shape9.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelStatue.java b/com/hbm/render/ModelStatue.java index 410f7cbcd..bca573a4b 100644 --- a/com/hbm/render/ModelStatue.java +++ b/com/hbm/render/ModelStatue.java @@ -89,7 +89,8 @@ public class ModelStatue extends ModelBase setRotation(Shape10, -0.1745329F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -111,7 +112,8 @@ public class ModelStatue extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSteelBeam.java b/com/hbm/render/ModelSteelBeam.java index 20b7c4f93..bb179e583 100644 --- a/com/hbm/render/ModelSteelBeam.java +++ b/com/hbm/render/ModelSteelBeam.java @@ -33,7 +33,8 @@ public class ModelSteelBeam extends ModelBase setRotation(Shape1, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -52,7 +53,8 @@ public class ModelSteelBeam extends ModelBase Shape1.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSteelCorner.java b/com/hbm/render/ModelSteelCorner.java index 0d99e723d..ef80fdb68 100644 --- a/com/hbm/render/ModelSteelCorner.java +++ b/com/hbm/render/ModelSteelCorner.java @@ -54,7 +54,8 @@ public class ModelSteelCorner extends ModelBase setRotation(Shape4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -79,7 +80,8 @@ public class ModelSteelCorner extends ModelBase Shape4.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSteelRoof.java b/com/hbm/render/ModelSteelRoof.java index 01d7f4dc9..f24f6b766 100644 --- a/com/hbm/render/ModelSteelRoof.java +++ b/com/hbm/render/ModelSteelRoof.java @@ -47,7 +47,8 @@ public class ModelSteelRoof extends ModelBase setRotation(Shape3, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -70,7 +71,8 @@ public class ModelSteelRoof extends ModelBase Shape3.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSteelScaffold.java b/com/hbm/render/ModelSteelScaffold.java index d430f79ee..bf5605251 100644 --- a/com/hbm/render/ModelSteelScaffold.java +++ b/com/hbm/render/ModelSteelScaffold.java @@ -110,7 +110,8 @@ public class ModelSteelScaffold extends ModelBase setRotation(Shape12, -0.6108652F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -151,7 +152,8 @@ public class ModelSteelScaffold extends ModelBase Shape12.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSteelWall.java b/com/hbm/render/ModelSteelWall.java index 35905b273..430761bcd 100644 --- a/com/hbm/render/ModelSteelWall.java +++ b/com/hbm/render/ModelSteelWall.java @@ -40,7 +40,8 @@ public class ModelSteelWall extends ModelBase setRotation(Shape2, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -61,7 +62,8 @@ public class ModelSteelWall extends ModelBase Shape2.render(f); } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelSword.java b/com/hbm/render/ModelSword.java index 8fdffba76..376aa19a7 100644 --- a/com/hbm/render/ModelSword.java +++ b/com/hbm/render/ModelSword.java @@ -75,7 +75,8 @@ public class ModelSword extends ModelBase setRotation(Shield2, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -95,7 +96,8 @@ public class ModelSword extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelT45Boots.java b/com/hbm/render/ModelT45Boots.java index 5288945c9..00a9578c6 100644 --- a/com/hbm/render/ModelT45Boots.java +++ b/com/hbm/render/ModelT45Boots.java @@ -78,7 +78,8 @@ public class ModelT45Boots extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { EntityPlayer player = (EntityPlayer)entity; if(player.isSneaking()) @@ -110,7 +111,8 @@ public class ModelT45Boots extends ModelBiped this.rightleg.rotationPointY += 0.5F; } } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelT45Chest.java b/com/hbm/render/ModelT45Chest.java index dcbe545c8..07aed1b76 100644 --- a/com/hbm/render/ModelT45Chest.java +++ b/com/hbm/render/ModelT45Chest.java @@ -202,7 +202,8 @@ public class ModelT45Chest extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { if(entity instanceof EntityPlayer) { @@ -252,7 +253,8 @@ public class ModelT45Chest extends ModelBiped this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY; this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ; } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelT45Helmet.java b/com/hbm/render/ModelT45Helmet.java index 37ca5faf5..301a3a44a 100644 --- a/com/hbm/render/ModelT45Helmet.java +++ b/com/hbm/render/ModelT45Helmet.java @@ -108,7 +108,8 @@ public class ModelT45Helmet extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { EntityPlayer player = (EntityPlayer)entity; if(player.isSneaking()) @@ -125,7 +126,8 @@ public class ModelT45Helmet extends ModelBiped this.helmet.rotateAngleX = this.bipedHead.rotateAngleX; } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelT45Legs.java b/com/hbm/render/ModelT45Legs.java index 16b9cf1e0..89ba90d40 100644 --- a/com/hbm/render/ModelT45Legs.java +++ b/com/hbm/render/ModelT45Legs.java @@ -17,8 +17,6 @@ import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; public class ModelT45Legs extends ModelBiped { @@ -96,7 +94,8 @@ public class ModelT45Legs extends ModelBiped model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { EntityPlayer player = (EntityPlayer)entity; @@ -129,7 +128,8 @@ public class ModelT45Legs extends ModelBiped this.rightleg.rotationPointY += 0.5F; } } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) + @Override +public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); diff --git a/com/hbm/render/ModelTapeRecorder.java b/com/hbm/render/ModelTapeRecorder.java index 636d5caa1..d7e0327c9 100644 --- a/com/hbm/render/ModelTapeRecorder.java +++ b/com/hbm/render/ModelTapeRecorder.java @@ -42,7 +42,8 @@ public class ModelTapeRecorder extends ModelBase setRotation(Part2, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -67,7 +68,8 @@ public class ModelTapeRecorder extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelTestBombAdvanced.java b/com/hbm/render/ModelTestBombAdvanced.java index a47f97415..9e092d0ff 100644 --- a/com/hbm/render/ModelTestBombAdvanced.java +++ b/com/hbm/render/ModelTestBombAdvanced.java @@ -82,7 +82,8 @@ public class ModelTestBombAdvanced extends ModelBase setRotation(BombBody, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -115,7 +116,8 @@ public class ModelTestBombAdvanced extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/ModelTestRender.java b/com/hbm/render/ModelTestRender.java index 6d407436b..e4477244e 100644 --- a/com/hbm/render/ModelTestRender.java +++ b/com/hbm/render/ModelTestRender.java @@ -33,7 +33,8 @@ public class ModelTestRender extends ModelBase setRotation(MainBlock, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + @Override +public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); @@ -51,7 +52,8 @@ public class ModelTestRender extends ModelBase model.rotateAngleZ = z; } - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + @Override +public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } diff --git a/com/hbm/render/RenderBombMulti.java b/com/hbm/render/RenderBombMulti.java index 810dba8ee..78deabce8 100644 --- a/com/hbm/render/RenderBombMulti.java +++ b/com/hbm/render/RenderBombMulti.java @@ -22,7 +22,8 @@ public class RenderBombMulti extends TileEntitySpecialRenderer { bombTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BombGeneric.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderBombMultiLarge.java b/com/hbm/render/RenderBombMultiLarge.java index 0e65b3553..0141a1522 100644 --- a/com/hbm/render/RenderBombMultiLarge.java +++ b/com/hbm/render/RenderBombMultiLarge.java @@ -22,7 +22,8 @@ public class RenderBombMultiLarge extends TileEntitySpecialRenderer { bombTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BombGenericLargeLayout.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderCentrifuge.java b/com/hbm/render/RenderCentrifuge.java index caaa87aca..15e49287f 100644 --- a/com/hbm/render/RenderCentrifuge.java +++ b/com/hbm/render/RenderCentrifuge.java @@ -22,7 +22,8 @@ public class RenderCentrifuge extends TileEntitySpecialRenderer { centrifugeTexture = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderDecoBlockAlt.java b/com/hbm/render/RenderDecoBlockAlt.java index a7ff84ec2..c82ab05d5 100644 --- a/com/hbm/render/RenderDecoBlockAlt.java +++ b/com/hbm/render/RenderDecoBlockAlt.java @@ -53,7 +53,7 @@ private static final ResourceLocation gunTexture = new ResourceLocation(RefStrin EntityItem watch = new EntityItem(null, 0.0D, 0.0D, 0.0D, new ItemStack(ModItems.watch)); this.bindTexture(texture); - this.itemRenderer.renderInFrame = true; + RenderItem.renderInFrame = true; this.model.renderModel(0.0625F); float g = 0.0625F; float q = g * 2 + 0.0625F / 3; @@ -61,7 +61,7 @@ private static final ResourceLocation gunTexture = new ResourceLocation(RefStrin GL11.glRotatef(180, 0F, 0F, 1F); if(tileentity instanceof TileEntityDecoBlockAltW || tileentity instanceof TileEntityDecoBlockAltF) this.itemRenderer.doRender(watch, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - this.itemRenderer.renderInFrame = false; + RenderItem.renderInFrame = false; GL11.glTranslatef(0.0F, 2 * g, -q); GL11.glRotatef(180, 0F, 0F, 1F); diff --git a/com/hbm/render/RenderDecoItem.java b/com/hbm/render/RenderDecoItem.java index e0695884f..75279a72f 100644 --- a/com/hbm/render/RenderDecoItem.java +++ b/com/hbm/render/RenderDecoItem.java @@ -6,21 +6,25 @@ import net.minecraft.item.ItemStack; public class RenderDecoItem extends RenderItem { RenderDecoItem(RenderDecoBlockAlt render) {} + @Override public byte getMiniBlockCount(ItemStack stack, byte original) { return 1; } + @Override public byte getMiniItemCount(ItemStack stack, byte original) { return 1; } + @Override public boolean shouldBob() { return false; } + @Override public boolean shouldSpreadItems() { return false; diff --git a/com/hbm/render/RenderFlare.java b/com/hbm/render/RenderFlare.java index 7f2454cf1..81220c5cc 100644 --- a/com/hbm/render/RenderFlare.java +++ b/com/hbm/render/RenderFlare.java @@ -17,7 +17,7 @@ public class RenderFlare extends Render { Tessellator tessellator = Tessellator.instance; RenderHelper.disableStandardItemLighting(); - float f1 = ((float)p_76986_1_.ticksExisted + 2.0F) / 200.0F; + float f1 = (p_76986_1_.ticksExisted + 2.0F) / 200.0F; float f2 = 0.0F; int count = 250; @@ -60,10 +60,10 @@ public class RenderFlare extends Render { tessellator.addVertex(0.0D, 0.0D, 0.0D); //tessellator.setColorRGBA_I(16711935, 0); tessellator.setColorRGBA_I(59345735, 0); - tessellator.addVertex(-0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); - tessellator.addVertex(0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); - tessellator.addVertex(0.0D, (double)f3, (double)(1.0F * f4)); - tessellator.addVertex(-0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.0D, f3, 1.0F * f4); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); tessellator.draw(); } diff --git a/com/hbm/render/RenderLaunchPadTier1.java b/com/hbm/render/RenderLaunchPadTier1.java index ccf24f698..3b7372d0c 100644 --- a/com/hbm/render/RenderLaunchPadTier1.java +++ b/com/hbm/render/RenderLaunchPadTier1.java @@ -3,7 +3,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; import com.hbm.blocks.TileEntityLaunchPad; -import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -60,7 +59,8 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer { missileThermoTexture = new ResourceLocation(RefStrings.MODID, "textures/models/MissileThermal.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNuclearCreeper.java b/com/hbm/render/RenderNuclearCreeper.java index 3e8f179a1..4d56e1bc2 100644 --- a/com/hbm/render/RenderNuclearCreeper.java +++ b/com/hbm/render/RenderNuclearCreeper.java @@ -7,11 +7,9 @@ import com.hbm.lib.RefStrings; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelCreeper; -import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; @@ -104,7 +102,7 @@ public class RenderNuclearCreeper extends RenderLiving if (p_77032_2_ == 1) { - float f1 = (float)p_77032_1_.ticksExisted + p_77032_3_; + float f1 = p_77032_1_.ticksExisted + p_77032_3_; this.bindTexture(armoredCreeperTextures); GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glLoadIdentity(); @@ -151,7 +149,8 @@ public class RenderNuclearCreeper extends RenderLiving * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: * entityLiving, partialTickTime */ - protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) + @Override + protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) { this.preRenderCallback((EntityNuclearCreeper)p_77041_1_, p_77041_2_); } @@ -159,7 +158,8 @@ public class RenderNuclearCreeper extends RenderLiving /** * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime */ - protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) + @Override + protected int getColorMultiplier(EntityLivingBase p_77030_1_, float p_77030_2_, float p_77030_3_) { return this.getColorMultiplier((EntityNuclearCreeper)p_77030_1_, p_77030_2_, p_77030_3_); } @@ -167,12 +167,14 @@ public class RenderNuclearCreeper extends RenderLiving /** * Queries whether should render the specified pass or not. */ - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) + @Override + protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { return this.shouldRenderPass((EntityNuclearCreeper)p_77032_1_, p_77032_2_, p_77032_3_); } - protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) + @Override + protected int inheritRenderPass(EntityLivingBase p_77035_1_, int p_77035_2_, float p_77035_3_) { return this.inheritRenderPass((EntityNuclearCreeper)p_77035_1_, p_77035_2_, p_77035_3_); } @@ -180,7 +182,8 @@ public class RenderNuclearCreeper extends RenderLiving /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityNuclearCreeper)p_110775_1_); } diff --git a/com/hbm/render/RenderNukeBoy.java b/com/hbm/render/RenderNukeBoy.java index 783e9a07d..2d06f7dee 100644 --- a/com/hbm/render/RenderNukeBoy.java +++ b/com/hbm/render/RenderNukeBoy.java @@ -22,7 +22,8 @@ public class RenderNukeBoy extends TileEntitySpecialRenderer { boyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/LilBoy2.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukeFleija.java b/com/hbm/render/RenderNukeFleija.java index 470d6a243..1cd49ca2d 100644 --- a/com/hbm/render/RenderNukeFleija.java +++ b/com/hbm/render/RenderNukeFleija.java @@ -24,7 +24,8 @@ public class RenderNukeFleija extends TileEntitySpecialRenderer { //manTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Prototype.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukeGadget.java b/com/hbm/render/RenderNukeGadget.java index 2be40b217..532e1e37c 100644 --- a/com/hbm/render/RenderNukeGadget.java +++ b/com/hbm/render/RenderNukeGadget.java @@ -22,7 +22,8 @@ public class RenderNukeGadget extends TileEntitySpecialRenderer { gadgetTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukeMan.java b/com/hbm/render/RenderNukeMan.java index bde25be25..feed16c91 100644 --- a/com/hbm/render/RenderNukeMan.java +++ b/com/hbm/render/RenderNukeMan.java @@ -22,7 +22,8 @@ public class RenderNukeMan extends TileEntitySpecialRenderer { manTexture = new ResourceLocation(RefStrings.MODID, "textures/models/FatMan.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukeMike.java b/com/hbm/render/RenderNukeMike.java index 304a0e221..9d752b45d 100644 --- a/com/hbm/render/RenderNukeMike.java +++ b/com/hbm/render/RenderNukeMike.java @@ -22,7 +22,8 @@ public class RenderNukeMike extends TileEntitySpecialRenderer { mikeTexture = new ResourceLocation(RefStrings.MODID, "textures/models/IvyMike.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukePrototype.java b/com/hbm/render/RenderNukePrototype.java index 9b156469c..c33fe2392 100644 --- a/com/hbm/render/RenderNukePrototype.java +++ b/com/hbm/render/RenderNukePrototype.java @@ -22,7 +22,8 @@ public class RenderNukePrototype extends TileEntitySpecialRenderer { tsarTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Prototype.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderNukeTsar.java b/com/hbm/render/RenderNukeTsar.java index 1c1960fd9..69bc46110 100644 --- a/com/hbm/render/RenderNukeTsar.java +++ b/com/hbm/render/RenderNukeTsar.java @@ -22,7 +22,8 @@ public class RenderNukeTsar extends TileEntitySpecialRenderer { tsarTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TsarBomba.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderPuF6Tank.java b/com/hbm/render/RenderPuF6Tank.java index e744b9803..9eb04ab20 100644 --- a/com/hbm/render/RenderPuF6Tank.java +++ b/com/hbm/render/RenderPuF6Tank.java @@ -22,7 +22,8 @@ public class RenderPuF6Tank extends TileEntitySpecialRenderer { tankTexture = new ResourceLocation(RefStrings.MODID, "textures/models/PUF6Tank.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RenderRocket.java b/com/hbm/render/RenderRocket.java index 73c9c135e..beae15fd6 100644 --- a/com/hbm/render/RenderRocket.java +++ b/com/hbm/render/RenderRocket.java @@ -5,12 +5,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import com.hbm.entity.EntityRocket; @@ -47,6 +43,7 @@ public class RenderRocket extends Render { return texture; } + @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityRocket) p_110775_1_); } diff --git a/com/hbm/render/RenderRotationTester.java b/com/hbm/render/RenderRotationTester.java index bb409598c..22a8a7c81 100644 --- a/com/hbm/render/RenderRotationTester.java +++ b/com/hbm/render/RenderRotationTester.java @@ -2,7 +2,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityRotationTester; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; diff --git a/com/hbm/render/RenderSmallNukeAlt.java b/com/hbm/render/RenderSmallNukeAlt.java index b6641f447..ef37411fb 100644 --- a/com/hbm/render/RenderSmallNukeAlt.java +++ b/com/hbm/render/RenderSmallNukeAlt.java @@ -107,7 +107,7 @@ public class RenderSmallNukeAlt extends Render { Tessellator tessellator = Tessellator.instance; RenderHelper.disableStandardItemLighting(); - float f1 = ((float)p_76986_1_.ticksExisted + 2.0F) / 200.0F; + float f1 = (p_76986_1_.ticksExisted + 2.0F) / 200.0F; float f2 = 0.0F; int count = 250; @@ -151,10 +151,10 @@ public class RenderSmallNukeAlt extends Render { tessellator.addVertex(0.0D, 0.0D, 0.0D); //tessellator.setColorRGBA_I(16711935, 0); tessellator.setColorRGBA_I(59345735, 0); - tessellator.addVertex(-0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); - tessellator.addVertex(0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); - tessellator.addVertex(0.0D, (double)f3, (double)(1.0F * f4)); - tessellator.addVertex(-0.866D * (double)f4, (double)f3, (double)(-0.5F * f4)); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.0D, f3, 1.0F * f4); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); tessellator.draw(); } diff --git a/com/hbm/render/RenderTapeRecorder.java b/com/hbm/render/RenderTapeRecorder.java index 89dfd9b37..385a07049 100644 --- a/com/hbm/render/RenderTapeRecorder.java +++ b/com/hbm/render/RenderTapeRecorder.java @@ -2,7 +2,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityDecoTapeRecorder; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; diff --git a/com/hbm/render/RenderTestContainer.java b/com/hbm/render/RenderTestContainer.java index 12a4c04e2..5ab7fe3e0 100644 --- a/com/hbm/render/RenderTestContainer.java +++ b/com/hbm/render/RenderTestContainer.java @@ -124,7 +124,7 @@ public class RenderTestContainer extends TileEntitySpecialRenderer GL11.glTranslatef(0.0F, 0.0F, -1.0F); } - GL11.glRotatef((float)short1, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); float f1 = p_147500_1_.prevLidAngle + (p_147500_1_.lidAngle - p_147500_1_.prevLidAngle) * p_147500_8_; float f2; @@ -159,7 +159,8 @@ public class RenderTestContainer extends TileEntitySpecialRenderer } } - public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) + @Override + public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { this.renderTileEntityAt((TileEntityTestContainer)p_147500_1_, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); } diff --git a/com/hbm/render/RenderTestMissile.java b/com/hbm/render/RenderTestMissile.java index 744a127a4..f25a04808 100644 --- a/com/hbm/render/RenderTestMissile.java +++ b/com/hbm/render/RenderTestMissile.java @@ -1,13 +1,9 @@ package com.hbm.render; -import java.util.Random; - import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; diff --git a/com/hbm/render/RenderTestRender.java b/com/hbm/render/RenderTestRender.java index 61d0dfa7d..0a7701a6c 100644 --- a/com/hbm/render/RenderTestRender.java +++ b/com/hbm/render/RenderTestRender.java @@ -2,7 +2,6 @@ package com.hbm.render; import org.lwjgl.opengl.GL11; -import com.hbm.blocks.TileEntityRotationTester; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; diff --git a/com/hbm/render/RenderUF6Tank.java b/com/hbm/render/RenderUF6Tank.java index 812962679..583f778bf 100644 --- a/com/hbm/render/RenderUF6Tank.java +++ b/com/hbm/render/RenderUF6Tank.java @@ -22,7 +22,8 @@ public class RenderUF6Tank extends TileEntitySpecialRenderer { tankTexture = new ResourceLocation(RefStrings.MODID, "textures/models/UF6Tank.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y, z + 0.5D); diff --git a/com/hbm/render/RendererObjTester.java b/com/hbm/render/RendererObjTester.java index 857ab9e24..4c50cb98f 100644 --- a/com/hbm/render/RendererObjTester.java +++ b/com/hbm/render/RendererObjTester.java @@ -24,7 +24,8 @@ public class RendererObjTester extends TileEntitySpecialRenderer { //objTesterTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Prototype.png"); } - public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5D, y + 3, z + 0.5D); diff --git a/com/hbm/world/Antenna.java b/com/hbm/world/Antenna.java index 40c066f8c..1d73b350a 100644 --- a/com/hbm/world/Antenna.java +++ b/com/hbm/world/Antenna.java @@ -58,6 +58,7 @@ public class Antenna extends WorldGenerator return false; } + @Override public boolean generate(World world, Random rand, int x, int y, int z) { int i = rand.nextInt(1); diff --git a/com/hbm/world/CrashedVertibird.java b/com/hbm/world/CrashedVertibird.java index 08ac8480b..34d3a7bd8 100644 --- a/com/hbm/world/CrashedVertibird.java +++ b/com/hbm/world/CrashedVertibird.java @@ -61,6 +61,7 @@ public class CrashedVertibird extends WorldGenerator return false; } + @Override public boolean generate(World world, Random rand, int x, int y, int z) { int i = rand.nextInt(1); diff --git a/com/hbm/world/DesertAtom001.java b/com/hbm/world/DesertAtom001.java index cbbfcf188..5d123fb8a 100644 --- a/com/hbm/world/DesertAtom001.java +++ b/com/hbm/world/DesertAtom001.java @@ -90,6 +90,7 @@ public class DesertAtom001 extends WorldGenerator return false; } + @Override public boolean generate(World world, Random rand, int x, int y, int z) { int i = rand.nextInt(1); diff --git a/com/hbm/world/HugeMush.java b/com/hbm/world/HugeMush.java index 3dc0dff75..4401709a0 100644 --- a/com/hbm/world/HugeMush.java +++ b/com/hbm/world/HugeMush.java @@ -5,7 +5,6 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import net.minecraft.block.Block; -import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; @@ -19,7 +18,8 @@ public class HugeMush extends WorldGenerator super(false); } - public boolean generate(World world, Random rand, int x, int y, int z) + @Override + public boolean generate(World world, Random rand, int x, int y, int z) { for(int i = -1; i < 2; i++) { diff --git a/com/hbm/world/Radio01.java b/com/hbm/world/Radio01.java index 86fe7be9d..6410d4b33 100644 --- a/com/hbm/world/Radio01.java +++ b/com/hbm/world/Radio01.java @@ -59,6 +59,7 @@ public class Radio01 extends WorldGenerator } + @Override public boolean generate(World world, Random rand, int x, int y, int z) { int i = rand.nextInt(1); diff --git a/com/hbm/world/Radio02.java b/com/hbm/world/Radio02.java index 33d354c80..1135f3a58 100644 --- a/com/hbm/world/Radio02.java +++ b/com/hbm/world/Radio02.java @@ -7,7 +7,6 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.main.MainRegistry; -import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/world/Vertibird.java b/com/hbm/world/Vertibird.java index e9befc20b..638602cfb 100644 --- a/com/hbm/world/Vertibird.java +++ b/com/hbm/world/Vertibird.java @@ -61,6 +61,7 @@ public class Vertibird extends WorldGenerator return false; } + @Override public boolean generate(World world, Random rand, int x, int y, int z) { int i = rand.nextInt(1);