From b9cdef8209a76813cdfdb096dcd287cc089be4b9 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Tue, 31 Dec 2013 16:56:55 -0500 Subject: [PATCH] get rid of some orphaned classes --- .../tconstruct/blocks/GolemCoreBlock.java | 115 -- .../tconstruct/blocks/GolemHeadBlock.java | 1016 ----------------- .../tconstruct/blocks/GolemPedestalBlock.java | 146 --- .../blocks/logic/GolemCoreLogic.java | 117 -- .../blocks/logic/GolemPedestalLogic.java | 363 ------ .../tconstruct/blocks/slime/SlimeGel.java | 4 +- .../tconstruct/blocks/slime/SlimeLeaves.java | 6 +- .../blocks/slime/SlimeTallGrass.java | 21 +- .../client/block/GolemCoreRender.java | 60 - .../client/block/GolemCoreSpecialRender.java | 65 -- .../client/entity/GolemBaseModel.java | 79 -- 11 files changed, 16 insertions(+), 1976 deletions(-) delete mode 100644 src/main/java/tconstruct/blocks/GolemCoreBlock.java delete mode 100644 src/main/java/tconstruct/blocks/GolemHeadBlock.java delete mode 100644 src/main/java/tconstruct/blocks/GolemPedestalBlock.java delete mode 100644 src/main/java/tconstruct/blocks/logic/GolemCoreLogic.java delete mode 100644 src/main/java/tconstruct/blocks/logic/GolemPedestalLogic.java delete mode 100644 src/main/java/tconstruct/client/block/GolemCoreRender.java delete mode 100644 src/main/java/tconstruct/client/block/GolemCoreSpecialRender.java delete mode 100644 src/main/java/tconstruct/client/entity/GolemBaseModel.java diff --git a/src/main/java/tconstruct/blocks/GolemCoreBlock.java b/src/main/java/tconstruct/blocks/GolemCoreBlock.java deleted file mode 100644 index 6de1f68bd34..00000000000 --- a/src/main/java/tconstruct/blocks/GolemCoreBlock.java +++ /dev/null @@ -1,115 +0,0 @@ -package tconstruct.blocks; - -import tconstruct.TConstruct; -import tconstruct.blocks.logic.GolemCoreLogic; -import tconstruct.client.block.GolemCoreRender; -import tconstruct.library.TConstructRegistry; -import mantle.blocks.abstracts.InventoryBlock; -import net.minecraft.block.material.Material; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class GolemCoreBlock extends InventoryBlock -{ - public GolemCoreBlock(int id) - { - super(id, Material.rock); - this.setCreativeTab(TConstructRegistry.blockTab); - } - - public boolean isOpaqueCube () - { - return false; - } - - public boolean renderAsNormalBlock () - { - return false; - } - - public int getRenderType () - { - return GolemCoreRender.model; - } - - @Override - public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) - { - if (!world.isRemote) - { - GolemCoreLogic logic = (GolemCoreLogic) world.getBlockTileEntity(x, y, z); - - if (!logic.isStackInSlot(0)) - { - ItemStack stack = player.getCurrentEquippedItem(); - stack = player.inventory.decrStackSize(player.inventory.currentItem, 1); - logic.setInventorySlotContents(0, stack); - } - else - { - ItemStack stack = logic.decrStackSize(0, 1); - if (stack != null) - addItemToInventory(player, world, x, y, z, stack); - } - - world.markBlockForUpdate(x, y, z); - } - return true; - } - - protected void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack) - { - if (!world.isRemote) - { - EntityItem entityitem = new EntityItem(world, (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack); - world.spawnEntityInWorld(entityitem); - entityitem.onCollideWithPlayer(player); - } - } - - public int damageDropped (int meta) - { - return meta; - } - - @Override - public Icon getIcon (int side, int meta) - { - return icons[0]; - } - - @Override - public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) - { - return true; - } - - @Override - public TileEntity createTileEntity (World world, int metadata) - { - return new GolemCoreLogic(); - } - - @Override - public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer) - { - return null; //Not sure if gui block or not, probably not - } - - @Override - public Object getModInstance () - { - return TConstruct.instance; - } - - @Override - public String[] getTextureNames () - { - return new String[] { "golemcore" }; - } -} diff --git a/src/main/java/tconstruct/blocks/GolemHeadBlock.java b/src/main/java/tconstruct/blocks/GolemHeadBlock.java deleted file mode 100644 index 258c7a89144..00000000000 --- a/src/main/java/tconstruct/blocks/GolemHeadBlock.java +++ /dev/null @@ -1,1016 +0,0 @@ -package tconstruct.blocks; - -import mantle.blocks.MantleBlock; -import tconstruct.blocks.logic.GolemCoreLogic; -import tconstruct.common.TContent; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class GolemHeadBlock extends MantleBlock -{ - /*public static int headSideTex = ModLoader.addOverride("/terrain.png", "/GGE/golemheadside.png"); - public static int headTopTex = ModLoader.addOverride("/terrain.png", "/GGE/golemheadtop&bottom.png"); - public static int face;*/ - - public GolemHeadBlock() - { - super(Material.ground); - //setTickRandomly(true); - } - - public IIcon[] icons; - public String[] textureNames = new String[] { "golemhead_face", "golemhead_side", "golemhead_top" }; - - @Override - public void registerIcons (IIconRegister iconRegister) - { - this.icons = new IIcon[textureNames.length]; - - for (int i = 0; i < this.icons.length; ++i) - { - this.icons[i] = iconRegister.registerIcon("tinker:" + textureNames[i]); - } - } - - @Override - public void onNeighborBlockChange (World world, int x, int y, int z, int blockID) - { - if (buildGolem(world, x, y, z, world.getBlockMetadata(x, y, z))) - { - //mod_Golems.trigger("headachievement"); - } - } - - /*public int getIcon(int i, int j) - { - if (i == 1) - { - return headTopTex; - } - if (i == 0) - { - return headTopTex; - } - int k = face; - if (j == 2 && i == 2) - { - return k; - } - if (j == 3 && i == 5) - { - return k; - } - if (j == 0 && i == 3) - { - return k; - } - if (j == 1 && i == 4) - { - return k; - } - else - { - return headSideTex; - } - }*/ - - /*public int getBlockTextureFromSide(int i) - { - int j = face; - if (i == 1) - { - return blockIndexInTexture; - } - if (i == 0) - { - return blockIndexInTexture; - } - if (i == 3) - { - return j; - } - else - { - return blockIndexInTexture + 16; - } - }*/ - - @Override - public void onBlockPlacedBy (World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack par6ItemStack) - { - int l = MathHelper.floor_double((double) ((entityliving.rotationYaw * 4F) / 360F) + 2.5D) & 3; - world.setBlockMetadataWithNotify(i, j, k, l, 3); - if (!buildGolem(world, i, j, k, l)) - { - for (int i1 = 0; (double) i1 < Math.random() * 5D + 3D; i1++) - { - world.spawnParticle("largesmoke", (double) i + Math.random(), (double) j + 1.2D + Math.random() / 2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - } - } - /*else - { - mod_Golems.trigger("headachievement"); - }*/ - } - - private boolean idIsInvalid (int i) - { - //return Block.blocksList[i] != null && (!Block.blocksList[i].renderAsNormalBlock() && i != TContent.golemCore.blockID || i == 43 || i == 44 || i == Block.chest.blockID); - return false; - } - - private boolean buildGolem (World world, int x, int y, int z, int metadata) - { - /*int pedestalHeight = 0; - for (int yPos = 1; yPos <= 3; yPos++) - { - if (world.getBlockId(x, y - yPos, z) == TContent.golemPedestal.blockID) - { - pedestalHeight = yPos; - } - } - - if (pedestalHeight == 0) - { - return false; - } - for (int height = pedestalHeight; height >= 0; height--) - { - if (world.getBlockId(x, y - height, z) == 0) - { - return false; - } - } - - int l1 = 0; - int i2 = 0; - ItemStack itemstack = null; - GolemCoreLogic coreLogic = null; - int golemBlockIDs[][] = new int[3][3]; - int golemBlockMetas[][] = new int[3][3]; - for (int arrX = 0; arrX < 3; arrX++) - { - for (int arrY = 0; arrY < 3; arrY++) - { - golemBlockIDs[arrX][arrY] = 0; - } - } - - for (int iterX = -1; iterX <= 1; iterX++) - { - for (int iterY = 0; iterY < 3; iterY++) - { - if (iterY + (3 - pedestalHeight) >= 3 || iterY + (3 - pedestalHeight) == 0 && iterX != 0) - { - continue; - } - if (metadata == 0) - { - int bID = world.getBlockId(x - iterX, y - iterY, z); - if (idIsInvalid(bID)) - { - bID = 0; - return false; - } - if (bID == blockID) - { - i2++; - } - golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] = bID; - golemBlockMetas[iterX + 1][iterY + (3 - pedestalHeight)] = bID == blockID ? 0 : world.getBlockMetadata(x - iterX, y - iterY, z); - } - if (metadata == 1) - { - int l3 = world.getBlockId(x, y - iterY, z - iterX); - if (idIsInvalid(l3)) - { - l3 = 0; - return false; - } - if (l3 == blockID) - { - i2++; - } - golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] = l3; - golemBlockMetas[iterX + 1][iterY + (3 - pedestalHeight)] = l3 == blockID ? 0 : world.getBlockMetadata(x, y - iterY, z - iterX); - } - if (metadata == 2) - { - int i4 = world.getBlockId(x + iterX, y - iterY, z); - if (idIsInvalid(i4)) - { - i4 = 0; - return false; - } - if (i4 == blockID) - { - i2++; - } - golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] = i4; - golemBlockMetas[iterX + 1][iterY + (3 - pedestalHeight)] = i4 == blockID ? 0 : world.getBlockMetadata(x + iterX, y - iterY, z); - } - if (metadata == 3) - { - int bID = world.getBlockId(x, y - iterY, z + iterX); - if (idIsInvalid(bID)) - { - bID = 0; - return false; - } - if (bID == blockID) - { - i2++; - } - golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] = bID; - golemBlockMetas[iterX + 1][iterY + (3 - pedestalHeight)] = bID == blockID ? 0 : world.getBlockMetadata(x, y - iterY, z + iterX); - } - if (i2 > 1) - { - return false; - } - if (golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] != 0 && Block.blocksList[golemBlockIDs[iterX + 1][iterY]] != null - && !Block.blocksList[golemBlockIDs[iterX + 1][iterY]].renderAsNormalBlock() && (iterX + 1 == 0 || iterX + 1 == 2) && iterY == 2 - && golemBlockIDs[iterX + 1][iterY] != TContent.golemCore.blockID) - { - return false; - } - if (golemBlockIDs[iterX + 1][iterY + (3 - pedestalHeight)] == TContent.golemCore.blockID) - { - l1++; - if (metadata == 0) - { - coreLogic = (GolemCoreLogic) world.getBlockTileEntity(x - iterX, y - iterY, z); - } - if (metadata == 1) - { - coreLogic = (GolemCoreLogic) world.getBlockTileEntity(x, y - iterY, z - iterX); - } - if (metadata == 2) - { - coreLogic = (GolemCoreLogic) world.getBlockTileEntity(x + iterX, y - iterY, z); - } - if (metadata == 3) - { - coreLogic = (GolemCoreLogic) world.getBlockTileEntity(x, y - iterY, z + iterX); - } - itemstack = coreLogic.getKey(); - } - if (l1 > 1) - { - return false; - } - } - } - - boolean flag = false; - for (int j3 = 0; j3 < 3; j3++) - { - for (int k4 = 0; k4 < 3; k4++) - { - if (golemBlockIDs[k4][j3] == this.blockID) - { - flag = true; - } - } - } - - if (!flag) - { - return false; - } - if (golemBlockIDs[0][2] != 0 && Block.blocksList[golemBlockIDs[0][2]].renderAsNormalBlock() || golemBlockIDs[2][2] != 0 && Block.blocksList[golemBlockIDs[2][2]].renderAsNormalBlock()) - { - return false; - } - if (l1 > 0 - && (golemBlockIDs[0][0] == TContent.golemCore.blockID || golemBlockIDs[0][1] == TContent.golemCore.blockID || golemBlockIDs[2][0] == TContent.golemCore.blockID || golemBlockIDs[2][1] == TContent.golemCore.blockID)) - { - return false; - } - TileEntity tileentity = world.getBlockTileEntity(x, y - pedestalHeight, z); - if (!(tileentity instanceof TileEntityGolemPedestal)) - { - return false; - } - TileEntityGolemPedestal tileentitygolempedestal = (TileEntityGolemPedestal) tileentity; - if (tileentitygolempedestal.subtractSoul(l1 == 1 ? 8 : 1) && world.getBlockId(x, y - pedestalHeight, z) == TContent.golemPedestal.blockID) - { - EntityGenericGolem entitygenericgolem = new EntityGenericGolem(world); - EntityPlayerSP entityplayersp = ModLoader.getMinecraftInstance().thePlayer; - double d = ((EntityPlayer) (entityplayersp)).posX - (double) (float) ((double) x + 0.5D); - double d1 = ((EntityPlayer) (entityplayersp)).posZ - (double) (float) ((double) z + 0.5D); - entitygenericgolem.setBody(golemBlockIDs, golemBlockMetas, y, pedestalHeight); - entitygenericgolem.setPositionAndRotation((double) x + 0.5D, (y - pedestalHeight) + 1, (double) z + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - if (l1 > 0) - { - entitygenericgolem.setCore(itemstack); - } - if (coreLogic != null) - { - //((GolemCoreBlock) mod_Golems.golemCore).killDisplayItem(world, coreLogic.xCoord, coreLogic.yCoord, coreLogic.zCoord); - //coreLogic.key = null; - } - if (!buildInterrupt(world, x, y, z, metadata, golemBlockIDs, golemBlockMetas, pedestalHeight, coreLogic != null, itemstack, coreLogic) && world.spawnEntityInWorld(entitygenericgolem)) - { - delBlocks(world, x, y, z, metadata, golemBlockIDs, pedestalHeight); - world.spawnParticle("hugeexplosion", (double) x + Math.random(), (double) y + 1.2D, (double) z + Math.random(), 0.0D, 0.0D, 0.0D); - return true; - } - else - { - return false; - } - } - else - { - return false; - }*/ - return false; - } - - public boolean buildInterrupt (World world, int i, int j, int k, int l, int ai[][], int ai1[][], int i1, boolean flag, ItemStack itemstack, GolemCoreLogic tileentitygolemcore) - { - /*EntityPlayerSP entityplayersp = ModLoader.getMinecraftInstance().thePlayer; - double d = ((EntityPlayer) (entityplayersp)).posX - (double) (float) ((double) i + 0.5D); - double d1 = ((EntityPlayer) (entityplayersp)).posZ - (double) (float) ((double) k + 0.5D); - int j1 = world.difficultySetting; - int k1 = 0; - for (int l1 = 0; l1 < 3; l1++) - { - for (int i2 = 0; i2 < 3; i2++) - { - if (ai[l1][i2] != 0) - { - k1++; - } - } - } - - boolean flag1 = ai[0][1] != 0 || ai[2][1] != 0; - if (isAll(ai, ai1, Block.tnt.blockID, -1) || i1 == 3 && ai[1][1] == Block.tnt.blockID && ai[1][2] == Block.cloth.blockID && ai1[1][2] == 5 && !flag1 && j1 >= 1) - { - EntityCreeper entitycreeper = new EntityCreeper(world); - entitycreeper.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - world.spawnEntityInWorld(entitycreeper); - delBlocks(world, i, j, k, l, ai, i1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("creeper"); - return true; - } - if (isAll(ai, ai1, Block.netherrack.blockID, -1) && i1 == 3 && j1 >= 1) - { - EntityBlaze entityblaze = new EntityBlaze(world); - entityblaze.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - world.spawnEntityInWorld(entityblaze); - delBlocks(world, i, j, k, l, ai, i1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("blaze"); - return true; - } - if (isAll(ai, ai1, Block.obsidian.blockID, -1) && i1 == 3 && countBlock(ai, ai1, Block.obsidian.blockID, -1) == 2 && j1 >= 1) - { - EntityEnderman entityenderman = new EntityEnderman(world); - entityenderman.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - world.spawnEntityInWorld(entityenderman); - delBlocks(world, i, j, k, l, ai, i1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("enderman"); - return true; - } - if (hasBlock(ai, ai1, Block.tnt.blockID, -1) && hasBlock(ai, ai1, Block.netherrack.blockID, -1)) - { - boolean flag2 = false; - Entity aentity[][] = new Entity[3][3]; - for (int j2 = 0; j2 < 3; j2++) - { - for (int l2 = 0; l2 < 3; l2++) - { - aentity[j2][l2] = null; - if (ai[j2][l2] == Block.tnt.blockID) - { - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world); - entitytntprimed.fuse = 80; - aentity[j2][l2] = entitytntprimed; - } - } - } - - replEntity(world, i, j, k, l, ai, aentity, i1); - i1 = updateBody(ai, ai1); - EntityGenericGolem entitygenericgolem = new EntityGenericGolem(world); - entitygenericgolem.setBody(ai, ai1, l, i1); - entitygenericgolem.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - if (flag) - { - entitygenericgolem.setCore(itemstack); - } - world.spawnEntityInWorld(entitygenericgolem); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("boom"); - return true; - } - if (i1 == 3 && !flag1 && ai[1][2] == Block.blockIron.blockID && ai[1][1] == Block.blockIron.blockID) - { - List list = world.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getAABBPool().getAABB(i, j, k, (double) i + 1.0D, (double) j + 1.0D, (double) k + 1.0D).expand(4D, 16D, 4D)); - Entity entity; - for (Iterator iterator = list.iterator(); iterator.hasNext(); world.addWeatherEffect(new EntityLightningBolt(world, entity.posX, entity.posY, entity.posZ))) - { - Object obj = iterator.next(); - entity = (Entity) obj; - } - - mod_Golems.trigger("zap"); - } - else - { - if (isAll(ai, ai1, Block.cloth.blockID, 0) && countBlock(ai, ai1, Block.cloth.blockID, 0) == 4) - { - EntitySheep entitysheep = new EntitySheep(world); - entitysheep.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - world.spawnEntityInWorld(entitysheep); - delBlocks(world, i, j, k, l, ai, i1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("sheep"); - return true; - } - if (countBlock(ai, ai1, Block.furnaceIdle.blockID, -1) >= (int) (Math.random() * 2D + 2D)) - { - ItemStack aitemstack[][] = new ItemStack[3][3]; - aitemstack[0][1] = new ItemStack(Block.lavaMoving, 1); - aitemstack[2][1] = new ItemStack(Block.lavaMoving, 1); - aitemstack[1][0] = new ItemStack(Block.lavaMoving, 1); - aitemstack[1][1] = new ItemStack(Block.lavaMoving, 1); - aitemstack[1][2] = new ItemStack(Block.lavaMoving, 1); - replBlocks(world, i, j, k, l, ai, aitemstack, i1); - mod_Golems.trigger("meltdown"); - return true; - } - if (hasBlock(ai, ai1, Block.stoneBrick.blockID, -1) && Math.random() <= 0.40000000000000002D) - { - boolean flag3 = false; - Entity aentity1[][] = new Entity[3][3]; - for (int k2 = 0; k2 < 3; k2++) - { - for (int i3 = 0; i3 < 3; i3++) - { - aentity1[k2][i3] = null; - if (ai[k2][i3] == Block.stoneBrick.blockID) - { - aentity1[k2][i3] = Math.random() <= 0.59999999999999998D ? ((Entity) (new EntitySilverfish(world))) : null; - } - } - } - - replEntity(world, i, j, k, l, ai, aentity1, i1); - i1 = updateBody(ai, ai1); - EntityGenericGolem entitygenericgolem1 = new EntityGenericGolem(world); - entitygenericgolem1.setBody(ai, ai1, l, i1); - entitygenericgolem1.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - if (flag) - { - entitygenericgolem1.setCore(itemstack); - } - world.spawnEntityInWorld(entitygenericgolem1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("silverfish"); - return true; - } - if (countBlock(ai, ai1, Block.melon.blockID, -1) == 4) - { - delBlocks(world, i, j, k, l, ai, i1); - EntityGSpawn entitygspawn = new EntityGSpawn(world); - entitygspawn.setPosition(i, j, k); - entitygspawn.skin = "http://s3.amazonaws.com/MinecraftSkins/loligator704.png"; - world.spawnEntityInWorld(entitygspawn); - mod_Golems.trigger("loligator"); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - return true; - } - if (countBlock(ai, ai1, Block.cloth.blockID, 13) == 3 && ai[1][1] == Block.cloth.blockID && ai1[1][1] == 0) - { - delBlocks(world, i, j, k, l, ai, i1); - EntityGSpawn entitygspawn1 = new EntityGSpawn(world); - entitygspawn1.setPosition(i, j, k); - entitygspawn1.skin = "http://s3.amazonaws.com/MinecraftSkins/coalheartly.png"; - world.spawnEntityInWorld(entitygspawn1); - mod_Golems.trigger("bitterman"); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - return true; - } - if (countBlock(ai, ai1, Block.cloth.blockID, 11) == 3 && ai[1][1] == Block.blockLapis.blockID) - { - delBlocks(world, i, j, k, l, ai, i1); - EntityGSpawn entitygspawn2 = new EntityGSpawn(world); - entitygspawn2.setPosition(i, j, k); - entitygspawn2.skin = "http://s3.amazonaws.com/MinecraftSkins/BILLYTG101.png"; - world.spawnEntityInWorld(entitygspawn2); - mod_Golems.trigger("yourstruly"); - return true; - } - if (countBlock(ai, ai1, Block.cloth.blockID, 12) == 2 && ai[1][1] == Block.blockGold.blockID && ai[1][2] == Block.cloth.blockID && ai1[1][2] == 0) - { - delBlocks(world, i, j, k, l, ai, i1); - EntityGSpawn entitygspawn3 = new EntityGSpawn(world); - entitygspawn3.setPosition(i, j, k); - entitygspawn3.skin = "http://s3.amazonaws.com/MinecraftSkins/Notch.png"; - world.spawnEntityInWorld(entitygspawn3); - mod_Golems.trigger("king"); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - return true; - } - - if (isAll(ai, ai1, Block.blockClay.blockID, -1) && i1 == 3 && countBlock(ai, ai1, Block.blockClay.blockID, -1) == 2 && j1 >= 1) - { - EntityZombie entityzombie = new EntityZombie(world); - entityzombie.setPositionAndRotation((double) i + 0.5D, (j - i1) + 1, (double) k + 0.5D, (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F, 0.0F); - world.spawnEntityInWorld(entityzombie); - delBlocks(world, i, j, k, l, ai, i1); - world.spawnParticle("hugeexplosion", (double) i + Math.random(), (double) j + 1.2D, (double) k + Math.random(), 0.0D, 0.0D, 0.0D); - mod_Golems.trigger("zombie"); - return true; - } - }*/ - return false; - } - - private void delBlocks (World world, int i, int j, int k, int l, int ai[][], int i1) - { - for (int j1 = -1; j1 <= 1; j1++) - { - for (int k1 = 0; k1 < i1; k1++) - { - if (k1 == 0 && j1 != 0 || ai[j1 + 1][(k1 - i1) + 3] == 0) - { - continue; - } - if (l == 0) - { - world.setBlock(i - j1, j - k1, k, 0); - } - if (l == 1) - { - world.setBlock(i, j - k1, k - j1, 0); - } - if (l == 2) - { - world.setBlock(i + j1, j - k1, k, 0); - } - if (l == 3) - { - world.setBlock(i, j - k1, k + j1, 0); - } - } - } - - if (i1 == 2 && (ai[0][1] != 0 || ai[2][1] != 0)) - { - if (l == 0) - { - if (ai[0][1] != 0) - { - world.setBlock(i + 1, j, k, 0); - } - if (ai[2][1] != 0) - { - world.setBlock(i - 1, j, k, 0); - } - } - if (l == 1) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k + 1, 0); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k - 1, 0); - } - } - if (l == 2) - { - if (ai[0][1] != 0) - { - world.setBlock(i - 1, j, k, 0); - } - if (ai[2][1] != 0) - { - world.setBlock(i + 1, j, k, 0); - } - } - if (l == 3) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k - 1, 0); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k + 1, 0); - } - } - } - } - - private boolean hasBlock (int ai[][], int ai1[][], int i, int j) - { - for (int k = 0; k < 3; k++) - { - for (int l = 0; l < 3; l++) - { - if (ai[k][l] == i && (ai1[k][l] == j || j == -1)) - { - return true; - } - } - } - - return false; - } - - private void replBlocks (World world, int i, int j, int k, int l, int ai[][], ItemStack aitemstack[][], int i1) - { - for (int j1 = -1; j1 <= 1; j1++) - { - for (int k1 = 0; k1 < i1; k1++) - { - if (aitemstack[j1 + 1][(k1 - i1) + 3] == null) - { - aitemstack[j1 + 1][(k1 - i1) + 3] = new ItemStack(0, 0, 0); - } - if (k1 == 0 && j1 != 0 || ai[j1 + 1][(k1 - i1) + 3] == 0) - { - continue; - } - if (l == 0) - { - world.setBlock(i - j1, j - k1, k, aitemstack[j1 + 1][(k1 - i1) + 3].itemID, aitemstack[j1 + 1][(k1 - i1) + 3].getItemDamage(), 3); - } - if (l == 1) - { - world.setBlock(i, j - k1, k - j1, aitemstack[j1 + 1][(k1 - i1) + 3].itemID, aitemstack[j1 + 1][(k1 - i1) + 3].getItemDamage(), 3); - } - if (l == 2) - { - world.setBlock(i + j1, j - k1, k, aitemstack[j1 + 1][(k1 - i1) + 3].itemID, aitemstack[j1 + 1][(k1 - i1) + 3].getItemDamage(), 3); - } - if (l == 3) - { - world.setBlock(i, j - k1, k + j1, aitemstack[j1 + 1][(k1 - i1) + 3].itemID, aitemstack[j1 + 1][(k1 - i1) + 3].getItemDamage(), 3); - } - } - } - - if (i1 == 2 && (ai[0][1] != 0 || ai[2][1] != 0)) - { - if (l == 0) - { - if (ai[0][1] != 0) - { - world.setBlock(i + 1, j, k, aitemstack[0][1].itemID, aitemstack[0][1].getItemDamage(), 3); - } - if (ai[2][1] != 0) - { - world.setBlock(i - 1, j, k, aitemstack[2][1].itemID, aitemstack[2][1].getItemDamage(), 3); - } - } - if (l == 1) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k + 1, aitemstack[0][1].itemID, aitemstack[0][1].getItemDamage(), 3); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k - 1, aitemstack[2][1].itemID, aitemstack[2][1].getItemDamage(), 3); - } - } - if (l == 2) - { - if (ai[0][1] != 0) - { - world.setBlock(i - 1, j, k, aitemstack[0][1].itemID, aitemstack[0][1].getItemDamage(), 3); - } - if (ai[2][1] != 0) - { - world.setBlock(i + 1, j, k, aitemstack[2][1].itemID, aitemstack[2][1].getItemDamage(), 3); - } - } - if (l == 3) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k - 1, aitemstack[0][1].itemID, aitemstack[0][1].getItemDamage(), 3); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k + 1, aitemstack[2][1].itemID, aitemstack[2][1].getItemDamage(), 3); - } - } - } - } - - private void replEntity (World world, int i, int j, int k, int l, int ai[][], Entity aentity[][], int i1) - { - for (int j1 = -1; j1 <= 1; j1++) - { - for (int k1 = 0; k1 < i1; k1++) - { - if (k1 == 0 && j1 != 0) - { - continue; - } - Entity entity8 = aentity[j1 + 1][(k1 - i1) + 3]; - if (ai[j1 + 1][(k1 - i1) + 3] == 0) - { - if (entity8 != null) - { - entity8.setDead(); - } - continue; - } - if (l == 0) - { - world.setBlock(i - j1, j - k1, k, 0); - if (entity8 != null) - { - entity8.setPosition(((float) i - (float) j1) + 0.5F, ((float) j - (float) k1) + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(entity8); - ai[j1 + 1][(k1 - i1) + 3] = 0; - } - } - if (l == 1) - { - world.setBlock(i, j - k1, k - j1, 0); - if (entity8 != null) - { - entity8.setPosition(((float) i - (float) j1) + 0.5F, ((float) j - (float) k1) + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(entity8); - ai[j1 + 1][(k1 - i1) + 3] = 0; - } - } - if (l == 2) - { - world.setBlock(i + j1, j - k1, k, 0); - if (entity8 != null) - { - entity8.setPosition(((float) i - (float) j1) + 0.5F, ((float) j - (float) k1) + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(entity8); - ai[j1 + 1][(k1 - i1) + 3] = 0; - } - } - if (l != 3) - { - continue; - } - world.setBlock(i, j - k1, k + j1, 0); - if (entity8 != null) - { - entity8.setPosition(((float) i - (float) j1) + 0.5F, ((float) j - (float) k1) + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(entity8); - ai[j1 + 1][(k1 - i1) + 3] = 0; - } - } - } - - if (i1 == 2 && (ai[0][1] != 0 || ai[2][1] != 0)) - { - Object obj = null; - if (l == 0) - { - if (ai[0][1] != 0) - { - world.setBlock(i + 1, j, k, 0); - Entity entity; - if ((entity = aentity[0][1]) != null) - { - entity.setPosition((float) i + 1.0F + 0.5F, (float) j + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(aentity[0][1]); - ai[2][1] = 0; - } - } - else if (aentity[0][1] != null) - { - aentity[0][1].setDead(); - } - if (ai[2][1] != 0) - { - world.setBlock(i - 1, j, k, 0); - Entity entity1; - if ((entity1 = aentity[2][1]) != null) - { - entity1.setPosition(((float) i - 1.0F) + 0.5F, (float) j + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(aentity[2][1]); - ai[2][1] = 0; - } - } - else if (aentity[2][1] != null) - { - aentity[2][1].setDead(); - } - } - if (l == 1) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k + 1, 0); - Entity entity2; - if ((entity2 = aentity[0][1]) != null) - { - entity2.setPosition((float) i + 0.5F, (float) j + 0.5F, (float) k + 1.0F + 0.5F); - world.spawnEntityInWorld(aentity[0][1]); - ai[2][1] = 0; - } - } - else if (aentity[0][1] != null) - { - aentity[0][1].setDead(); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k - 1, 0); - Entity entity3; - if ((entity3 = aentity[2][1]) != null) - { - entity3.setPosition((float) i + 0.5F, (float) j + 0.5F, ((float) k - 1.0F) + 0.5F); - world.spawnEntityInWorld(aentity[2][1]); - ai[2][1] = 0; - } - } - else if (aentity[2][1] != null) - { - aentity[2][1].setDead(); - } - } - if (l == 2) - { - if (ai[0][1] != 0) - { - world.setBlock(i - 1, j, k, 0); - Entity entity4; - if ((entity4 = aentity[0][1]) != null) - { - entity4.setPosition(((float) i - 1.0F) + 0.5F, (float) j + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(aentity[0][1]); - ai[2][1] = 0; - } - } - else if (aentity[0][1] != null) - { - aentity[0][1].setDead(); - } - if (ai[2][1] != 0) - { - world.setBlock(i + 1, j, k, 0); - Entity entity5; - if ((entity5 = aentity[2][1]) != null) - { - entity5.setPosition((float) i + 1.0F + 0.5F, (float) j + 0.5F, (float) k + 0.5F); - world.spawnEntityInWorld(aentity[2][1]); - ai[2][1] = 0; - } - } - else if (aentity[2][1] != null) - { - aentity[2][1].setDead(); - } - } - if (l == 3) - { - if (ai[0][1] != 0) - { - world.setBlock(i, j, k - 1, 0); - Entity entity6; - if ((entity6 = aentity[0][1]) != null) - { - entity6.setPosition((float) i + 0.5F, (float) j + 0.5F, (float) k + 1.0F + 0.5F); - world.spawnEntityInWorld(aentity[0][1]); - } - } - else if (aentity[0][1] != null) - { - aentity[0][1].setDead(); - } - if (ai[2][1] != 0) - { - world.setBlock(i, j, k + 1, 0); - Entity entity7; - if ((entity7 = aentity[2][1]) != null) - { - entity7.setPosition((float) i + 0.5F, (float) j + 0.5F, (float) k + 1.0F + 0.5F); - world.spawnEntityInWorld(aentity[2][1]); - } - } - else if (aentity[2][1] != null) - { - aentity[2][1].setDead(); - } - } - } - } - - private int updateBody (int ai[][], int ai1[][]) - { - for (int i = 0; ai[1][2] == 0 && i < 3;) - { - i++; - for (int i1 = 0; i1 < 3; i1++) - { - int j2 = ai[i1][0]; - int l2 = ai[i1][1]; - ai[i1][0] = ai[i1][2]; - ai[i1][1] = j2; - ai[i1][2] = l2; - } - - int j1 = 0; - while (j1 < 3) - { - int k2 = ai1[j1][0]; - int i3 = ai1[j1][1]; - ai1[j1][0] = ai1[j1][2]; - ai1[j1][1] = k2; - ai1[j1][2] = i3; - j1++; - } - } - - if (ai[1][1] == 0) - { - for (int j = 0; j < 3; j++) - { - int k1 = ai[j][0]; - ai[j][0] = ai[j][1]; - ai[j][1] = k1; - } - - for (int k = 0; k < 3; k++) - { - int l1 = ai1[k][0]; - ai1[k][0] = ai1[k][1]; - ai1[k][1] = l1; - } - } - int l = 0; - for (int i2 = 0; i2 < 3; i2++) - { - if (ai[1][i2] != 0) - { - l = 3 - i2; - } - } - - if (l == 1) - { - ai[0][1] = 0; - ai[2][1] = 0; - ai1[0][1] = 0; - ai1[2][1] = 0; - } - return 0; - } - - private boolean isAll (int ai[][], int ai1[][], int i, int j) - { - boolean flag = false; - for (int k = 0; k < 3; k++) - { - for (int l = 0; l < 3; l++) - { - if (ai[k][l] != i && ai[k][l] != 0 && ai[k][l] != this.blockID && (ai1[k][l] != j || j == -1)) - { - return false; - } - if (ai[k][l] == i && (ai1[k][l] == j || j == -1)) - { - flag = true; - } - } - } - - return flag; - } - - private int countBlock (int ai[][], int ai1[][], int i, int j) - { - int k = 0; - for (int l = 0; l < 3; l++) - { - for (int i1 = 0; i1 < 3; i1++) - { - if (ai[l][i1] == i && (ai1[l][i1] == j || j == -1)) - { - k++; - } - } - } - - return k; - } -} diff --git a/src/main/java/tconstruct/blocks/GolemPedestalBlock.java b/src/main/java/tconstruct/blocks/GolemPedestalBlock.java deleted file mode 100644 index 4e6d2b344ec..00000000000 --- a/src/main/java/tconstruct/blocks/GolemPedestalBlock.java +++ /dev/null @@ -1,146 +0,0 @@ -package tconstruct.blocks; - -import java.util.Random; - -import tconstruct.blocks.logic.GolemPedestalLogic; -import mantle.blocks.abstracts.InventoryBlock; - -import net.minecraft.block.material.Material; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class GolemPedestalBlock extends InventoryBlock -{ - /*public static int texTop; - public static int texTopp; - public static int texSide; - public static int texBottom;*/ - - public GolemPedestalBlock(int i) - { - super(i, Material.wood); - /*texTop = ModLoader.addOverride("/terrain.png", "/GGE/pedestaltop.png"); - texTopp = ModLoader.addOverride("/terrain.png", "/GGE/pedestaltopp.png"); - texSide = ModLoader.addOverride("/terrain.png", "/GGE/pedestalside.png"); - texBottom = ModLoader.addOverride("/terrain.png", "/GGE/pedestalbottom.png");*/ - } - - /*public int getIcon(int i, int j) - { - if (i == 1) - { - return j == 0 ? texTop : texTopp; - } - if (i == 0) - { - return texBottom; - } - if (i == 2 || i == 4) - { - return texSide; - } - else - { - return texSide; - } - }*/ - - /*public int idDropped(int i, Random random, int j) - { - return super.idDropped(i, random, j); - }*/ - - /*public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving) - { - super.onBlockPlacedBy(world, i, j, k, entityliving); - ItemStack itemstack = ((EntityPlayer)entityliving).getCurrentEquippedItem(); - world.setBlockMetadata(i, j, k, itemstack.getItemDamage()); - }*/ - - public void onBlockRemoval (World world, int i, int j, int k) - { - Random random = new Random(); - GolemPedestalLogic tileentitygolempedestal = (GolemPedestalLogic) world.getBlockTileEntity(i, j, k); - if (tileentitygolempedestal != null) - { - label0: for (int l = 0; l < tileentitygolempedestal.getSizeInventory(); l++) - { - ItemStack itemstack = tileentitygolempedestal.getStackInSlot(l); - if (itemstack == null) - { - continue; - } - float f = random.nextFloat() * 0.8F + 0.1F; - float f1 = random.nextFloat() * 0.8F + 0.1F; - float f2 = random.nextFloat() * 0.8F + 0.1F; - do - { - if (itemstack.stackSize <= 0) - { - continue label0; - } - int i1 = random.nextInt(21) + 10; - if (i1 > itemstack.stackSize) - { - i1 = itemstack.stackSize; - } - itemstack.stackSize -= i1; - EntityItem entityitem = new EntityItem(world, (float) i + f, (float) j + f1, (float) k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage())); - float f3 = 0.05F; - entityitem.motionX = (float) random.nextGaussian() * f3; - entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float) random.nextGaussian() * f3; - world.spawnEntityInWorld(entityitem); - } while (true); - } - } - //super.onBlockRemoval(world, i, j, k); - } - - public boolean blockActivated (World world, int i, int j, int k, EntityPlayer entityplayer) - { - /*ItemStack itemstack = entityplayer.getCurrentEquippedItem(); - if (world.isRemote) - { - return true; - } - if (itemstack == null || itemstack != null && (itemstack.itemID >= 256 || itemstack.itemID == 0 || itemstack.itemID == Block.slowSand.blockID)) - { - ModLoader.openGUI(entityplayer, new GuiGolemPedestal(entityplayer.inventory, world, i, j, k)); - return true; - } - else - { - return false; - }*/ - return false; - } - - @Override - public TileEntity createTileEntity (World world, int metadata) - { - return new GolemPedestalLogic(); - } - - @Override - public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer) - { - // TODO Auto-generated method stub - return null; - } - - @Override - public Object getModInstance () - { - return null; - } - - @Override - public String[] getTextureNames () - { - return null; - } -} diff --git a/src/main/java/tconstruct/blocks/logic/GolemCoreLogic.java b/src/main/java/tconstruct/blocks/logic/GolemCoreLogic.java deleted file mode 100644 index 69b747bc523..00000000000 --- a/src/main/java/tconstruct/blocks/logic/GolemCoreLogic.java +++ /dev/null @@ -1,117 +0,0 @@ -package tconstruct.blocks.logic; - -import mantle.blocks.abstracts.InventoryLogic; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet132TileEntityData; -import net.minecraft.world.World; - -public class GolemCoreLogic extends InventoryLogic implements IInventory -{ - - public GolemCoreLogic() - { - super(1); - } - - public ItemStack getKey () - { - return inventory[0]; - } - - public void setKey (ItemStack itemstack) - { - inventory[0] = itemstack; - onInventoryChanged(); - } - - public void clear () - { - inventory[0] = null; - } - - public int getSizeInventory () - { - return 1; - } - - public ItemStack getStackInSlot (int slot) - { - return inventory[0]; - } - - public int getInventoryStackLimit () - { - return 1; - } - - public boolean canInteractWith (EntityPlayer entityplayer) - { - return true; - } - - public void openChest () - { - } - - public void closeChest () - { - } - - public boolean isUseableByPlayer (EntityPlayer entityplayer) - { - return true; - } - - @Override - public ItemStack getStackInSlotOnClosing (int i) - { - return null; - } - - @Override - public boolean isInvNameLocalized () - { - return false; - } - - @Override - public boolean isItemValidForSlot (int i, ItemStack itemstack) - { - return true; - } - - @Override - public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) - { - return null; - } - - @Override - protected String getDefaultName () - { - return "golems.core"; - } - - /* Packets */ - @Override - public Packet getDescriptionPacket () - { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); - } - - @Override - public void onDataPacket (INetworkManager net, Packet132TileEntityData packet) - { - readFromNBT(packet.data); - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); - } -} diff --git a/src/main/java/tconstruct/blocks/logic/GolemPedestalLogic.java b/src/main/java/tconstruct/blocks/logic/GolemPedestalLogic.java deleted file mode 100644 index 53bd1aa0a26..00000000000 --- a/src/main/java/tconstruct/blocks/logic/GolemPedestalLogic.java +++ /dev/null @@ -1,363 +0,0 @@ -package tconstruct.blocks.logic; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import tconstruct.TConstruct; - -public class GolemPedestalLogic extends TileEntity implements IInventory -{ - public ItemStack supply; - public static int cost[] = null; - public static int souls[] = null; - - public GolemPedestalLogic() - { - supply = null; - if (cost == null) - { - cost = new int[512]; - souls = new int[512]; - cost[Blocks.planks] = 0; - cost[Blocks.wood] = 32; - cost[Blocks.cloth] = 8; - cost[Blocks.cobblestoneMossy] = 16; - cost[Blocks.obsidian] = 8; - cost[Blocks.pumpkin] = 8; - cost[Blocks.netherrack] = 64; - cost[Blocks.slowSand] = 1; - cost[Blocks.glowStone] = 1; - cost[Blocks.pumpkinLantern] = 8; - cost[Blocks.blockDiamond] = 1; - cost[Blocks.blockGold] = 1; - cost[Blocks.blockIron] = 1; - cost[Blocks.blockLapis] = 1; - cost[Blocks.jukebox] = 1; - cost[Blocks.music] = 1; - cost[Blocks.melon] = 8; - cost[Blocks.torchRedstoneIdle] = 6; - cost[Blocks.torchRedstoneActive] = cost[Blocks.torchRedstoneIdle]; - cost[Items.redstone] = 6; - cost[Items.beefRaw] = 8; - cost[Items.beefCooked] = cost[Items.beefRaw]; - cost[Items.porkRaw] = cost[Items.beefRaw]; - cost[Items.porkCooked] = cost[Items.beefRaw]; - cost[Items.enderPearl] = 1; - cost[Items.eyeOfEnder] = 1; - cost[Items.blazeRod] = 2; - cost[Blocks.mushroomBrown] = 16; - cost[Blocks.mushroomRed] = cost[Blocks.mushroomBrown]; - cost[Blocks.netherStalk] = 6; - cost[Items.glowstone] = 4; - cost[Items.diamond] = 1; - cost[Items.ingotIron] = 8; - cost[Items.ingotGold] = 2; - cost[Items.reed] = 8; - cost[Items.sugar] = cost[Items.reed]; - cost[Items.bucketLava] = 1; - cost[Items.cake] = 1; - cost[Items.bucketMilk] = 1; - cost[Items.wheat] = 32; - cost[Items.bread] = 8; - cost[Blocks.plantYellow] = 32; - cost[Blocks.plantRed] = cost[Blocks.plantYellow]; - cost[Blocks.dragonEgg] = 1; - cost[Blocks.tallGrass] = 64; - cost[Blocks.sapling] = 64; - cost[Items.ghastTear] = 8; - cost[Items.goldNugget] = 18; - cost[Items.spiderEye] = 16; - cost[Items.fermentedSpiderEye] = 6; - cost[Items.bowlSoup] = 0; - cost[Items.fishRaw] = 1; - cost[Items.fishCooked] = cost[Items.fishRaw]; - cost[Items.magmaCream] = 2; - cost[Items.blazePowder] = 4; - cost[Items.speckledMelon] = 1; - cost[Items.paper] = 8; - cost[Items.book] = 2; - cost[Items.egg] = 4; - cost[Items.slimeBall] = 2; - cost[Items.saddle] = 1; - cost[Items.feather] = 48; - cost[Items.gunpowder] = 16; - cost[Items.appleRed] = 8; - cost[Items.appleGold] = 1; - cost[Items.dyePowder] = 64; - cost[Items.bone] = 2; - cost[Items.rottenFlesh] = 48; - cost[Items.cookie] = 16; - cost[Items.melon] = 32; - cost[Items.chickenCooked] = 8; - cost[Items.chickenRaw] = cost[Items.chickenCooked]; - cost[Items.silk] = 64; - cost[Blocks.cactus] = 32; - souls[Blocks.planks] = 0; - souls[Blocks.wood] = 1; - souls[Blocks.cloth] = 1; - souls[Blocks.cobblestoneMossy] = 1; - souls[Blocks.obsidian] = 1; - souls[Blocks.pumpkin] = 1; - souls[Blocks.netherrack] = 1; - souls[Blocks.slowSand] = 1; - souls[Blocks.glowStone] = 2; - souls[Blocks.pumpkinLantern] = 1; - souls[Blocks.blockDiamond] = 27; - souls[Blocks.blockGold] = 2; - souls[Blocks.blockIron] = 2; - souls[Blocks.blockLapis] = 3; - souls[Blocks.jukebox] = 3; - souls[Blocks.music] = 1; - souls[Blocks.melon] = 1; - souls[Blocks.torchRedstoneIdle] = 1; - souls[Blocks.torchRedstoneActive] = souls[Blocks.torchRedstoneIdle]; - souls[Items.redstone] = 1; - souls[Items.beefRaw] = 1; - souls[Items.beefCooked] = souls[Items.beefRaw]; - souls[Items.porkRaw] = souls[Items.beefRaw]; - souls[Items.porkCooked] = souls[Items.beefRaw]; - souls[Items.enderPearl] = 1; - souls[Items.eyeOfEnder] = 2; - souls[Items.blazeRod] = 2; - souls[Blocks.mushroomBrown] = 1; - souls[Blocks.mushroomRed] = souls[Blocks.mushroomBrown]; - souls[Blocks.netherStalk] = 1; - souls[Items.glowstone] = 1; - souls[Items.diamond] = 3; - souls[Items.ingotIron] = 1; - souls[Items.ingotGold] = 1; - souls[Items.reed] = 1; - souls[Items.sugar] = souls[Items.reed]; - souls[Items.bucketLava] = 1; - souls[Items.cake] = 1; - souls[Items.bucketMilk] = 1; - souls[Items.wheat] = 1; - souls[Items.bread] = 1; - souls[Blocks.plantYellow] = 1; - souls[Blocks.plantRed] = souls[Blocks.plantYellow]; - souls[Blocks.dragonEgg] = 1; - souls[Blocks.tallGrass] = 1; - souls[Blocks.sapling] = 1; - souls[Items.ghastTear] = 1; - souls[Items.goldNugget] = 1; - souls[Items.spiderEye] = 1; - souls[Items.fermentedSpiderEye] = 1; - souls[Items.bowlSoup] = 1; - souls[Items.fishRaw] = 1; - souls[Items.fishCooked] = souls[Items.fishRaw]; - souls[Items.magmaCream] = 1; - souls[Items.blazePowder] = 1; - souls[Items.speckledMelon] = 1; - souls[Items.paper] = 1; - souls[Items.book] = 1; - souls[Items.egg] = 1; - souls[Items.slimeBall] = 1; - souls[Items.saddle] = 1; - souls[Items.feather] = 1; - souls[Items.gunpowder] = 1; - souls[Items.appleRed] = 1; - souls[Items.appleGold] = 3; - souls[Items.dyePowder] = 1; - souls[Items.bone] = 1; - souls[Items.rottenFlesh] = 1; - souls[Items.cookie] = 1; - souls[Items.melon] = 1; - souls[Items.chickenCooked] = 1; - souls[Items.chickenRaw] = souls[Items.chickenCooked]; - souls[Items.silk] = 1; - souls[Blocks.cactus] = 1; - } - } - - public int getSizeInventory () - { - return 9; - } - - public ItemStack getStackInSlot (int i) - { - if (supply != null && supply.getItem() == null) - { - supply = null; - } - return supply; - } - - public boolean subtractSoul (int i) - { - TConstruct.logger.info("SUBTRACT WHY"); - if (supply == null || supply.itemID >= 512 || cost[supply] == 0) - { - worldObj.playSoundAtEntity(Minecraft.getMinecraft().thePlayer, "mob.blaze.death", 1.0F, 0.5F); - Minecraft.getMinecraft().thePlayer.addChatMessage("I require more souls..."); - return false; - } - int j = cost[supply]; - int k = souls[supply]; - int l = (supply.stackSize / j) * k; - TConstruct.logger.info((new StringBuilder()).append("Subtracting amt").append(i).append(" s").append(k).append(" c").append(j).append(" ss").append(supply.stackSize).append(" id") - .append(supply.itemID).append(" sa").append(l).append(" calc").append(Math.ceil((double) i / (double) k)).toString()); - if (l < i) - { - worldObj.playSoundAtEntity(Minecraft.getMinecraft().thePlayer, "mob.blaze.death", 1.0F, 0.5F); - Minecraft.getMinecraft().thePlayer.addChatMessage("I need more souls..."); - return false; - } - supply.stackSize -= Math.ceil((double) i / (double) k) * (double) j; - if (supply.stackSize == 0) - { - supply = null; - } - else if (supply.stackSize < 0) - { - throw new UnsupportedOperationException((new StringBuilder()) - .append("If you are getting this error then your golems mod has derped, \nplease contact billythegoat101 on the minecraftforums with the error code: LERN YO MATHS [i") - .append(supply.itemID).append(",ss").append(supply.stackSize).append(",a").append(i).append("]").toString()); - } - return true; - } - - public ItemStack decrStackSize (int i, int j) - { - if (supply != null && supply.getItem() == null) - { - supply = null; - } - if (supply != null) - { - if (supply.stackSize <= j) - { - ItemStack itemstack = supply; - supply = null; - onInventoryChanged(); - return itemstack; - } - ItemStack itemstack1 = supply.splitStack(j); - if (supply.stackSize == 0) - { - supply = null; - } - onInventoryChanged(); - return itemstack1; - } - else - { - return null; - } - } - - public void setInventorySlotContents (int i, ItemStack itemstack) - { - supply = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - } - if (supply != null && supply.getItem() == null) - { - supply = null; - } - onInventoryChanged(); - } - - public void writeToNBT (NBTTagCompound nbttagcompound) - { - super.writeToNBT(nbttagcompound); - if (supply == null) - { - supply = new ItemStack(0, 0, 0); - } - NBTTagList nbttaglist = new NBTTagList(); - if (supply != null) - { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) 0); - supply.writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - nbttagcompound.setTag("Items", nbttaglist); - } - - public void readFromNBT (NBTTagCompound nbttagcompound) - { - super.readFromNBT(nbttagcompound); - supply = new ItemStack(0, 0, 0); - NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); - for (int i = 0; i < nbttaglist.tagCount(); i++) - { - NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i); - int j = nbttagcompound1.getByte("Slot") & 0xff; - if (j >= 0 && j < 1) - { - supply = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - - if (supply != null && supply.getItem() == null) - { - supply = null; - } - } - - public String getInvName () - { - return "golempedestalinv"; - } - - public int getInventoryStackLimit () - { - return 64; - } - - public boolean canInteractWith (EntityPlayer entityplayer) - { - return true; - } - - public void openChest () - { - } - - public void closeChest () - { - } - - public void clear () - { - supply = null; - } - - public boolean isUseableByPlayer (EntityPlayer entityplayer) - { - return true; - } - - @Override - public ItemStack getStackInSlotOnClosing (int i) - { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean isInvNameLocalized () - { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean isItemValidForSlot (int i, ItemStack itemstack) - { - // TODO Auto-generated method stub - return false; - } -} diff --git a/src/main/java/tconstruct/blocks/slime/SlimeGel.java b/src/main/java/tconstruct/blocks/slime/SlimeGel.java index eebd51d2e16..33f8a6f35ee 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeGel.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeGel.java @@ -19,9 +19,9 @@ public class SlimeGel extends TConstructBlock { - public SlimeGel(int id) + public SlimeGel() { - super(id, Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" }); + super(Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" }); setCreativeTab(TConstructRegistry.blockTab); } diff --git a/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java b/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java index 61e5fcb286d..4ac929d37df 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java @@ -22,9 +22,9 @@ public class SlimeLeaves extends BlockLeaves private static final String[] fastLeaves = new String[] { "slimeleaves_blue_fast" }; private static final String[] fancyLeaves = new String[] { "slimeleaves_blue_fancy" }; @SideOnly(Side.CLIENT) - private Icon[] fastIcons; + private IIcon[] fastIcons; @SideOnly(Side.CLIENT) - private Icon[] fancyIcons; + private IIcon[] fancyIcons; public SlimeLeaves() { @@ -66,7 +66,7 @@ public void registerIcons (IIconRegister iconRegister) } } - public Icon getIcon (int side, int meta) + public IIcon getIcon (int side, int meta) { int tex = meta % 4; diff --git a/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java b/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java index 910cc91b352..7cb436b2318 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java @@ -4,12 +4,13 @@ import java.util.List; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.IShearable; @@ -21,11 +22,11 @@ public class SlimeTallGrass extends BlockFlower implements IShearable { private static final String[] grassTypes = new String[] { "slimegrass_blue_tall" }; @SideOnly(Side.CLIENT) - private Icon[] iconArray; + private IIcon[] iconArray; - public SlimeTallGrass(int par1) + public SlimeTallGrass() { - super(par1, Material.vine); + super(Material.vine); float f = 0.4F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f); setCreativeTab(TConstructRegistry.blockTab); @@ -35,7 +36,7 @@ public SlimeTallGrass(int par1) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ - public Icon getIcon (int side, int meta) + public IIcon getIcon (int side, int meta) { /*if (meta >= this.iconArray.length) { @@ -73,11 +74,11 @@ public int getDamageValue (World par1World, int par2, int par3, int par4) /** * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) */ - public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List) + public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List) { for (int j = 0; j < 1; ++j) { - par3List.add(new ItemStack(par1, 1, j)); + par3List.add(new ItemStack(b, 1, j)); } } @@ -86,9 +87,9 @@ public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ - public void registerIcons (IconRegister par1IconRegister) + public void registerIcons (IIconRegister par1IconRegister) { - this.iconArray = new Icon[grassTypes.length]; + this.iconArray = new IIcon[grassTypes.length]; for (int i = 0; i < this.iconArray.length; ++i) { diff --git a/src/main/java/tconstruct/client/block/GolemCoreRender.java b/src/main/java/tconstruct/client/block/GolemCoreRender.java deleted file mode 100644 index 45971521f3c..00000000000 --- a/src/main/java/tconstruct/client/block/GolemCoreRender.java +++ /dev/null @@ -1,60 +0,0 @@ -package tconstruct.client.block; - -import tconstruct.client.TProxyClient; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; - -public class GolemCoreRender implements ISimpleBlockRenderingHandler -{ - public static int model = RenderingRegistry.getNextAvailableRenderId(); - - @Override - public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer) - { - renderer.setRenderBounds(0.0F, 0F, 0.0F, 1.0F, 0.1875F, 1.0F); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - renderer.setRenderBounds(0.0F, 0.8125F, 0.0F, 1.0F, 1.0F, 1.0F); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - renderer.setRenderBounds(0.0F, 0.1875F, 0.0F, 0.1875F, 0.8125F, 0.1875F); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - renderer.setRenderBounds(0.8175, 0.1875F, 0.0F, 1f, 0.8125F, 0.1875F); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - renderer.setRenderBounds(0.0F, 0.1875F, 0.8175, 0.1875F, 0.8125F, 1f); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - renderer.setRenderBounds(0.8175F, 0.1875F, 0.8175, 1f, 0.8125F, 1f); - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - } - - @Override - public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) - { - renderer.setRenderBounds(0.0F, 0F, 0.0F, 1.0F, 0.1875F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.0F, 0.8125F, 0.0F, 1.0F, 1.0F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.0F, 0.1875F, 0.0F, 0.1875F, 0.8125F, 0.1875F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.8175, 0.1875F, 0.0F, 1f, 0.8125F, 0.1875F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.0F, 0.1875F, 0.8175, 0.1875F, 0.8125F, 1f); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.8175F, 0.1875F, 0.8175, 1f, 0.8125F, 1f); - renderer.renderStandardBlock(block, x, y, z); - return true; - } - - @Override - public boolean shouldRender3DInInventory () - { - return true; - } - - @Override - public int getRenderId () - { - return model; - } -} diff --git a/src/main/java/tconstruct/client/block/GolemCoreSpecialRender.java b/src/main/java/tconstruct/client/block/GolemCoreSpecialRender.java deleted file mode 100644 index e5c1b884ab5..00000000000 --- a/src/main/java/tconstruct/client/block/GolemCoreSpecialRender.java +++ /dev/null @@ -1,65 +0,0 @@ -package tconstruct.client.block; - -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - -import tconstruct.blocks.logic.GolemCoreLogic; -import tconstruct.entity.FancyEntityItem; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/* Special renderer, only used for drawing tools */ - -@SideOnly(Side.CLIENT) -public class GolemCoreSpecialRender extends TileEntitySpecialRenderer -{ - @Override - public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8) - { - this.render((GolemCoreLogic) logic, var2, var4, var6, var8); - } - - public void render (GolemCoreLogic logic, double posX, double posY, double posZ, float var8) - { - GL11.glPushMatrix(); - float var10 = (float) (posX - 0.5F); - float var11 = (float) (posY - 0.5F); - float var12 = (float) (posZ - 0.5F); - GL11.glTranslatef(var10, var11, var12); - - ItemStack stack = logic.getStackInSlot(0); - if (stack != null) - renderItem(logic, stack); - - GL11.glPopMatrix(); - } - - void renderItem (GolemCoreLogic logic, ItemStack stack) - { - FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack); - entityitem.getEntityItem().stackSize = 1; - entityitem.hoverStart = 0.0F; - GL11.glPushMatrix(); - GL11.glTranslatef(1F, 0.675F, 1.0F); - //GL11.glRotatef(90F, 1, 0F, 0F); - GL11.glScalef(1.4F, 1.4F, 1.4F); - if (stack.getItem() instanceof ItemBlock) - { - GL11.glScalef(1.6F, 1.6F, 1.6F); - GL11.glTranslatef(0F, 0.045F, 0.0f); - } - - RenderItem.renderInFrame = true; - RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - RenderItem.renderInFrame = false; - - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/tconstruct/client/entity/GolemBaseModel.java b/src/main/java/tconstruct/client/entity/GolemBaseModel.java deleted file mode 100644 index 1ee9694ce48..00000000000 --- a/src/main/java/tconstruct/client/entity/GolemBaseModel.java +++ /dev/null @@ -1,79 +0,0 @@ -package tconstruct.client.entity; - -import net.minecraft.client.model.ModelPig; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -public class GolemBaseModel extends ModelPig -{ - ModelRenderer rightArm; - ModelRenderer leftArm; - - public GolemBaseModel() - { - float f = 0.0F; - float f1 = 0.0F; - head = new ModelRenderer(this, 0, 0); - head.addBox(-4F, -8F, -4F, 8, 8, 8, f); - head.setRotationPoint(0.0F, 0.0F + f1, 0.0F); - head.showModel = false; - body = new ModelRenderer(this, 16, 16); - body.addBox(-4F, 0.0F, -2F, 8, 12, 4, f); - body.setRotationPoint(0.0F, 0.0F + f1, 0.0F); - body.showModel = false; - rightArm = new ModelRenderer(this, 40, 16); - rightArm.addBox(-3F, -2F, -2F, 4, 12, 4, f); - rightArm.setRotationPoint(-5F, 2.0F + f1, 0.0F); - leftArm = new ModelRenderer(this, 40, 16); - leftArm.mirror = true; - leftArm.addBox(-1F, -2F, -2F, 4, 12, 4, f); - leftArm.setRotationPoint(5F, 2.0F + f1, 0.0F); - leg3 = new ModelRenderer(this, 0, 16); - leg3.addBox(-2F, 0.0F, -2F, 4, 12, 4, f); - leg3.setRotationPoint(-2F, 12F + f1, 0.0F); - leg4 = new ModelRenderer(this, 0, 16); - leg4.mirror = true; - leg4.addBox(-2F, 0.0F, -2F, 4, 12, 4, f); - leg4.setRotationPoint(2.0F, 12F + f1, 0.0F); - rightArm = new ModelRenderer(this, 40, 16); - rightArm.addBox(-1F, -2F, -1F, 2, 12, 2, f); - rightArm.setRotationPoint(-5F, 2.0F, 0.0F); - rightArm.showModel = false; - leftArm = new ModelRenderer(this, 40, 16); - leftArm.mirror = true; - leftArm.addBox(-1F, -2F, -1F, 2, 12, 2, f); - leftArm.setRotationPoint(5F, 2.0F, 0.0F); - leftArm.showModel = false; - leg3 = new ModelRenderer(this, 0, 16); - leg3.addBox(-1F, 0.0F, -1F, 2, 12, 2, f); - leg3.setRotationPoint(-2F, 12F, 0.0F); - leg3.showModel = false; - leg4 = new ModelRenderer(this, 0, 16); - leg4.mirror = true; - leg4.addBox(-1F, 0.0F, -1F, 2, 12, 2, f); - leg4.setRotationPoint(2.0F, 12F, 0.0F); - leg4.showModel = false; - leg1.showModel = leg2.showModel = false; - } - - @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); - float f6 = 0.0F; - float f7 = 0.0F; - rightArm.rotateAngleZ = 0.0F; - leftArm.rotateAngleZ = 0.0F; - rightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + head.rotateAngleY; - leftArm.rotateAngleY = (0.1F - f6 * 0.6F) + head.rotateAngleY + 0.4F; - rightArm.rotateAngleX = -1.570796F + head.rotateAngleX; - leftArm.rotateAngleX = -1.570796F + head.rotateAngleX; - rightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - leftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - rightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F; - leftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F; - rightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F; - leftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F; - } -}