From 9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 16:03:42 -0400 Subject: Formatting pass --- .../tileentity/TileEntityBlockShadow.java | 41 +- .../jewelrycraft/tileentity/TileEntityCrystal.java | 7 +- .../tileentity/TileEntityDisplayer.java | 13 +- .../tileentity/TileEntityHandPedestal.java | 13 +- .../tileentity/TileEntityJewelrsCraftingTable.java | 96 ++-- .../tileentity/TileEntityMidasTouch.java | 4 +- .../jewelrycraft/tileentity/TileEntityMolder.java | 47 +- .../tileentity/TileEntityMoltenMetal.java | 8 +- .../tileentity/TileEntityShadowEye.java | 567 +++++++++++++-------- .../jewelrycraft/tileentity/TileEntitySmelter.java | 79 +-- .../renders/TileEntityDisplayerRender.java | 175 ++++--- .../renders/TileEntityHandPedestalRender.java | 6 +- .../TileEntityJewelrsCraftingTableRender.java | 114 +++-- .../renders/TileEntityMidasTouchRender.java | 11 +- .../tileentity/renders/TileEntityMolderRender.java | 99 ++-- .../renders/TileEntityShadowEyeRender.java | 52 +- .../renders/TileEntitySmelterRender.java | 74 ++- 17 files changed, 890 insertions(+), 516 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/tileentity') diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java index b17047e..dc387ff 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java @@ -43,34 +43,45 @@ public class TileEntityBlockShadow extends TileEntity { public void updateEntity() { super.updateEntity(); int blockLight, realLight; - int lightValue = worldObj.getSavedLightValue(EnumSkyBlock.Sky, - xCoord, yCoord, zCoord) - worldObj.skylightSubtracted; - float sunPosAngle = worldObj.getCelestialAngleRadians(1.0F); + int lightValue = worldObj.getSavedLightValue( + EnumSkyBlock.Sky, xCoord, yCoord, zCoord) + - worldObj.skylightSubtracted; + float sunPosAngle = worldObj + .getCelestialAngleRadians(1.0F); if (sunPosAngle < (float) Math.PI) sunPosAngle += (0.0F - sunPosAngle) * 0.2F; else - sunPosAngle += ((float) Math.PI * 2F - sunPosAngle) * 0.2F; - lightValue = Math.round(lightValue * MathHelper.cos(sunPosAngle)); + sunPosAngle += ((float) Math.PI * 2F - sunPosAngle) + * 0.2F; + lightValue = Math.round( + lightValue * MathHelper.cos(sunPosAngle)); if (lightValue < 0) lightValue = 0; if (lightValue > 15) lightValue = 15; - blockLight = worldObj.getChunkFromBlockCoords(xCoord, zCoord) - .getSavedLightValue(EnumSkyBlock.Block, xCoord & 15, - yCoord, zCoord & 15); - realLight = worldObj.getChunkFromBlockCoords(xCoord, zCoord) - .getBlockLightValue(xCoord & 15, yCoord, zCoord & 15, 0); + blockLight = worldObj + .getChunkFromBlockCoords(xCoord, zCoord) + .getSavedLightValue(EnumSkyBlock.Block, + xCoord & 15, yCoord, + zCoord & 15); + realLight = worldObj + .getChunkFromBlockCoords(xCoord, zCoord) + .getBlockLightValue(xCoord & 15, yCoord, + zCoord & 15, 0); if (blockLight == 0 - && worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) + && worldObj.canBlockSeeTheSky(xCoord, + yCoord, zCoord) || lightValue >= blockLight) metadata = 15 - lightValue; - else if (!worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord)) + else if (!worldObj.canBlockSeeTheSky(xCoord, yCoord, + zCoord)) metadata = 15 - realLight; else if (lightValue < blockLight) metadata = 15 - blockLight; worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, metadata, 2); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, + zCoord, worldObj.getBlock(xCoord, yCoord, zCoord)); } @@ -81,8 +92,8 @@ public class TileEntityBlockShadow extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java index 46288b4..90fbd99 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java @@ -12,7 +12,7 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityCrystal extends TileEntity { public int shine = 120; boolean descent = false; - int timer = 0; + int timer = 0; @Override public void updateEntity() { @@ -28,8 +28,9 @@ public class TileEntityCrystal extends TileEntity { if (shine <= 100) descent = false; } - this.worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, - zCoord, xCoord, yCoord, zCoord); + this.worldObj.markBlockRangeForRenderUpdate( + xCoord, yCoord, zCoord, + xCoord, yCoord, zCoord); timer = 0; } } diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java index a0c2600..72fa7c0 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java @@ -11,10 +11,10 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityDisplayer extends TileEntity { public float ringTranslation1, ringTranslation2, ringTranslation3, rotAngle; - public boolean isDescending1, isDescending2, isDescending3, - isDirty, hasObject; + public boolean isDescending1, isDescending2, + isDescending3, isDirty, hasObject; public ItemStack object; - public int quantity, infoIndex, timer = 0; + public int quantity, infoIndex, timer = 0; /** * @@ -82,7 +82,8 @@ public class TileEntityDisplayer extends TileEntity { public void updateEntity() { super.updateEntity(); if (isDirty) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, + zCoord); isDirty = false; } if (ringTranslation1 >= 0.6) @@ -127,8 +128,8 @@ public class TileEntityDisplayer extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java index c44cd88..f6fb323 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java @@ -57,7 +57,8 @@ public class TileEntityHandPedestal extends TileEntity { super.readFromNBT(tagCompound); if (tagCompound.hasKey("object", 10)) setHeldItemStack(ItemStack.loadItemStackFromNBT( - tagCompound.getCompoundTag("object"))); + tagCompound.getCompoundTag( + "object"))); else removeHeldItemStack(); isHandOpen = tagCompound.getBoolean("isHandOpen"); @@ -71,7 +72,8 @@ public class TileEntityHandPedestal extends TileEntity { super.updateEntity(); updateGrip(); if (isDirty) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, + zCoord); isDirty = false; } } @@ -94,8 +96,8 @@ public class TileEntityHandPedestal extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 0, nbttagcompound); } /** @@ -129,7 +131,8 @@ public class TileEntityHandPedestal extends TileEntity { * @param heldItemStack */ public void setHeldItemStack(ItemStack heldItemStack) { - if (heldItemStack != null && heldItemStack.getItem() != null) { + if (heldItemStack != null + && heldItemStack.getItem() != null) { heldItemStack.stackSize = 1; this.heldItemStack = heldItemStack; if (heldItemStack.getItem() instanceof ItemBlock) diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java index 1b0ec8a..66d54b0 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java @@ -14,9 +14,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class TileEntityJewelrsCraftingTable extends TileEntity { - public boolean hasJewelry, hasEndItem, isDirty, hasGem, crafting; + public boolean hasJewelry, hasEndItem, isDirty, hasGem, + crafting; public ItemStack jewelry, endItem, gem; - public int carving, effect; + public int carving, effect; public float angle; /** @@ -88,7 +89,8 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { public void updateEntity() { super.updateEntity(); if (isDirty) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, + zCoord); isDirty = false; } if (angle < 360F) @@ -102,46 +104,78 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { for (int l = 0; l < ConfigHandler.GEM_PLACEMENT_TIME / (carving + 2); ++l) { if (worldObj.rand.nextInt(10) == 0) - worldObj.playSoundEffect(xCoord, yCoord + 0.5F, - zCoord, "random.orb", 0.05F, 1F); + worldObj.playSoundEffect( + xCoord, + yCoord + 0.5F, + zCoord, + "random.orb", + 0.05F, 1F); if (getBlockMetadata() == 0) - worldObj.spawnParticle("instantSpell", - xCoord + 0.5F, (double) yCoord + 0.8F, - zCoord + 0.2F, 0.0D, 0.0D, 0.0D); + worldObj.spawnParticle( + "instantSpell", + xCoord + 0.5F, + (double) yCoord + 0.8F, + zCoord + 0.2F, + 0.0D, 0.0D, + 0.0D); if (getBlockMetadata() == 1) - worldObj.spawnParticle("instantSpell", - xCoord + 0.8F, (double) yCoord + 0.8F, - zCoord + 0.5F, 0.0D, 0.0D, 0.0D); + worldObj.spawnParticle( + "instantSpell", + xCoord + 0.8F, + (double) yCoord + 0.8F, + zCoord + 0.5F, + 0.0D, 0.0D, + 0.0D); if (getBlockMetadata() == 2) - worldObj.spawnParticle("instantSpell", - xCoord + 0.5F, (double) yCoord + 0.8F, - zCoord + 0.8F, 0.0D, 0.0D, 0.0D); + worldObj.spawnParticle( + "instantSpell", + xCoord + 0.5F, + (double) yCoord + 0.8F, + zCoord + 0.8F, + 0.0D, 0.0D, + 0.0D); if (getBlockMetadata() == 3) - worldObj.spawnParticle("instantSpell", - xCoord + 0.2F, (double) yCoord + 0.8F, - zCoord + 0.5F, 0.0D, 0.0D, 0.0D); + worldObj.spawnParticle( + "instantSpell", + xCoord + 0.2F, + (double) yCoord + 0.8F, + zCoord + 0.5F, + 0.0D, 0.0D, + 0.0D); } if (carving == 0) { hasEndItem = true; endItem = jewelry.copy(); - if (hasGem - && gem != new ItemStack(Item.getItemById(0), 0, 0)) - if (!JewelryNBT.hasTag(jewelry, "gem")) { - JewelryNBT.addGem(endItem, gem); + if (hasGem && gem != new ItemStack( + Item.getItemById(0), 0, 0)) + if (!JewelryNBT.hasTag(jewelry, + "gem")) { + JewelryNBT.addGem(endItem, + gem); hasGem = false; - gem = new ItemStack(Item.getItemById(0), 0, 0); + gem = new ItemStack(Item + .getItemById(0), + 0, 0); } else { - ItemStack aux = JewelryNBT.gem(jewelry); - JewelryNBT.addGem(endItem, gem); - if (JewelrycraftUtil.rand.nextBoolean()) + ItemStack aux = JewelryNBT + .gem(jewelry); + JewelryNBT.addGem(endItem, + gem); + if (JewelrycraftUtil.rand + .nextBoolean()) gem = aux.copy(); else { hasGem = false; - gem = new ItemStack(Item.getItemById(0), 0, 0); + gem = new ItemStack( + Item.getItemById( + 0), + 0, + 0); } } hasJewelry = false; - jewelry = new ItemStack(Item.getItemById(0), 0, 0); + jewelry = new ItemStack( + Item.getItemById(0), 0, 0); carving = -1; crafting = false; isDirty = true; @@ -203,8 +237,8 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { public void dropItem(World world, double x, double y, double z, ItemStack stack) { - EntityItem entityitem = - new EntityItem(world, x + 0.5D, y + 1D, z + 0.5D, stack); + EntityItem entityitem = new EntityItem(world, x + 0.5D, + y + 1D, z + 0.5D, stack); entityitem.motionX = 0; entityitem.motionZ = 0; entityitem.motionY = 0.21000000298023224D; @@ -218,8 +252,8 @@ public class TileEntityJewelrsCraftingTable extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMidasTouch.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMidasTouch.java index 5d37f65..eab8bfb 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMidasTouch.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMidasTouch.java @@ -62,8 +62,8 @@ public class TileEntityMidasTouch extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java index 9fca5fc..c7607a4 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMolder.java @@ -11,8 +11,9 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; public class TileEntityMolder extends TileEntity { - public int cooling; - public boolean hasMoltenMetal, hasJewelBase, hasMold, isDirty; + public int cooling; + public boolean hasMoltenMetal, hasJewelBase, hasMold, + isDirty; public ItemStack mold, jewelBase, moltenMetal, ringMetal; public float quantity; @@ -85,17 +86,23 @@ public class TileEntityMolder extends TileEntity { public void updateEntity() { super.updateEntity(); if (isDirty) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, + zCoord); isDirty = false; } - if (hasMoltenMetal && moltenMetal.getItem() != Item.getItemById(0) + if (hasMoltenMetal + && moltenMetal.getItem() != Item + .getItemById(0) && quantity > 0f) { if (worldObj.rand.nextInt(20) == 0) - worldObj.playSoundEffect(xCoord, yCoord + 0.5F, zCoord, + worldObj.playSoundEffect(xCoord, + yCoord + 0.5F, zCoord, "random.fizz", 0.5F, 1F); for (int l = 0; l < 2; ++l) - worldObj.spawnParticle("reddust", xCoord + Math.random(), - (double) yCoord + 0.2F, zCoord + Math.random(), + worldObj.spawnParticle("reddust", + xCoord + Math.random(), + (double) yCoord + 0.2F, + zCoord + Math.random(), 0.0D, 1.0D, 1.0D); } if (hasMoltenMetal && !hasJewelBase && quantity >= 0.1f) { @@ -106,21 +113,29 @@ public class TileEntityMolder extends TileEntity { if (mold.getItemDamage() == 0) jewelBase = moltenMetal; else if (mold.getItemDamage() == 1) - jewelBase = new ItemStack(ItemList.ring); + jewelBase = new ItemStack( + ItemList.ring); else if (mold.getItemDamage() == 2) - jewelBase = new ItemStack(ItemList.necklace); + jewelBase = new ItemStack( + ItemList.necklace); else if (mold.getItemDamage() == 3) - jewelBase = new ItemStack(ItemList.bracelet); + jewelBase = new ItemStack( + ItemList.bracelet); else if (mold.getItemDamage() == 4) - jewelBase = new ItemStack(ItemList.earrings); + jewelBase = new ItemStack( + ItemList.earrings); ringMetal.stackSize = 1; jewelBase.stackSize = 1; if (mold.getItemDamage() != 0 - && jewelBase != new ItemStack(Item.getItemById(0), + && jewelBase != new ItemStack( + Item.getItemById( + 0), 0, 0)) - JewelryNBT.addMetal(jewelBase, ringMetal); + JewelryNBT.addMetal(jewelBase, + ringMetal); hasMoltenMetal = false; - moltenMetal = new ItemStack(Item.getItemById(0), 0, 0); + moltenMetal = new ItemStack( + Item.getItemById(0), 0, 0); hasJewelBase = true; cooling = -1; quantity = 0f; @@ -136,8 +151,8 @@ public class TileEntityMolder extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMoltenMetal.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMoltenMetal.java index 405011a..77e06c7 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMoltenMetal.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityMoltenMetal.java @@ -50,8 +50,8 @@ public class TileEntityMoltenMetal extends TileEntity { public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); if (nbt.hasKey("metal")) - setMetal(ItemStack - .loadItemStackFromNBT(nbt.getCompoundTag("metal"))); + setMetal(ItemStack.loadItemStackFromNBT( + nbt.getCompoundTag("metal"))); else metal = null; } @@ -60,8 +60,8 @@ public class TileEntityMoltenMetal extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 0, nbttagcompound); } @Override diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java index 234417d..c5b5aef 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java @@ -27,14 +27,13 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; public class TileEntityShadowEye extends TileEntity { - public int opening, timer, t = 20, soundTimer; - public boolean active, shouldAddData; - public ArrayList pedestalItems = - new ArrayList(); - ResourceLocation particleTexture = new ResourceLocation( + public int opening, timer, t = 20, soundTimer; + public boolean active, shouldAddData; + public ArrayList pedestalItems = new ArrayList(); + ResourceLocation particleTexture = new ResourceLocation( Variables.MODID, "textures/particle/shadows.png"); - public EntityPlayer target; - public ModelShadowEye model = new ModelShadowEye(); + public EntityPlayer target; + public ModelShadowEye model = new ModelShadowEye(); public TileEntityShadowEye() { opening = 1; @@ -63,21 +62,27 @@ public class TileEntityShadowEye extends TileEntity { @Override public void updateEntity() { super.updateEntity(); - boolean valid = isValidStructure(worldObj, xCoord, yCoord, zCoord, - blockMetadata); + boolean valid = isValidStructure(worldObj, xCoord, yCoord, + zCoord, blockMetadata); boolean canStartRitual = valid - && ((TileEntityHandPedestal) worldObj.getTileEntity(xCoord, - yCoord - 3, zCoord)).heldItemStack != null - && getNumberOfItems(worldObj, xCoord, yCoord, zCoord) > 0; + && ((TileEntityHandPedestal) worldObj + .getTileEntity(xCoord, + yCoord - 3, + zCoord)).heldItemStack != null + && getNumberOfItems(worldObj, xCoord, + yCoord, zCoord) > 0; if (active) { timer--; - if (canStartRitual - && canChangePedestals(worldObj, xCoord, yCoord, zCoord) + if (canStartRitual && canChangePedestals(worldObj, + xCoord, yCoord, zCoord) && opening == 4) - changePedestals(worldObj, xCoord, yCoord, zCoord); + changePedestals(worldObj, xCoord, yCoord, + zCoord); } - if (active && target != null && this.getDistanceFrom(target.posX, - target.posY, target.posZ) > 27D) { + if (active && target != null + && this.getDistanceFrom(target.posX, + target.posY, + target.posZ) > 27D) { active = false; timer = -1; shouldAddData = false; @@ -93,13 +98,16 @@ public class TileEntityShadowEye extends TileEntity { t = 20; } } - if (opening == 2 && timer <= 0 && t == 10 && shouldAddData) { + if (opening == 2 && timer <= 0 && t == 10 + && shouldAddData) { addData(worldObj, xCoord, yCoord, zCoord); - TileEntityHandPedestal target = - (TileEntityHandPedestal) worldObj.getTileEntity(xCoord, - yCoord - 3, zCoord); - if (target != null && target.getHeldItemStack() != null) - JewelryNBT.addModifiers(target.getHeldItemStack(), + TileEntityHandPedestal target = (TileEntityHandPedestal) worldObj + .getTileEntity(xCoord, yCoord - 3, + zCoord); + if (target != null && target + .getHeldItemStack() != null) + JewelryNBT.addModifiers( + target.getHeldItemStack(), pedestalItems); revertPedestals(worldObj, xCoord, yCoord, zCoord); } @@ -116,30 +124,38 @@ public class TileEntityShadowEye extends TileEntity { active = false; timer = -1; if (!worldObj.isRemote) { - JewelrycraftUtil.addCursePoints(target, 50); + JewelrycraftUtil.addCursePoints( + target, 50); target.addChatMessage( - new ChatComponentText(EnumChatFormatting.BLACK - + "The Shadows don't like to be disturbed for no reason!")); - target.addChatMessage(new ChatComponentText( - EnumChatFormatting.DARK_PURPLE - + "You feel a strange aura encumbering you.")); + new ChatComponentText( + EnumChatFormatting.BLACK + + "The Shadows don't like to be disturbed for no reason!")); + target.addChatMessage( + new ChatComponentText( + EnumChatFormatting.DARK_PURPLE + + "You feel a strange aura encumbering you.")); } } } if (active && opening == 4) { for (int l = 0; l <= 100; l++) worldObj.spawnParticle("depthsuspend", - xCoord + 6.5F - worldObj.rand.nextInt(12) + xCoord + 6.5F - worldObj.rand + .nextInt(12) - worldObj.rand.nextFloat(), - yCoord - 2F + worldObj.rand.nextInt(9) + yCoord - 2F + worldObj.rand + .nextInt(9) - worldObj.rand.nextFloat(), - zCoord + 6.5F - worldObj.rand.nextInt(12) + zCoord + 6.5F - worldObj.rand + .nextInt(12) - worldObj.rand.nextFloat(), 0, 0, 0); if (soundTimer == 0) - worldObj.playSound(xCoord + 0.5D, yCoord + 0.5D, - zCoord + 0.5D, "jewelrycraft2:Ritual", 1.0F, 1.0F, - false); + worldObj.playSound(xCoord + 0.5D, + yCoord + 0.5D, + zCoord + 0.5D, + "jewelrycraft2:Ritual", + 1.0F, 1.0F, false); if (soundTimer < 20 * 14) soundTimer++; else @@ -153,250 +169,340 @@ public class TileEntityShadowEye extends TileEntity { || world.getBlockMetadata(x, y, z) == 2) { // Layers from top to bottom // 1st Layer - if (world.getBlock(x, y + 1, z) != Blocks.stone_slab - || world.getBlockMetadata(x, y + 1, z) != 5) + if (world.getBlock(x, y + 1, + z) != Blocks.stone_slab + || world.getBlockMetadata(x, y + 1, + z) != 5) return false; - if (world.getBlock(x + 1, y + 1, z) != Blocks.stone_slab - || world.getBlockMetadata(x + 1, y + 1, z) != 5) + if (world.getBlock(x + 1, y + 1, + z) != Blocks.stone_slab + || world.getBlockMetadata(x + 1, + y + 1, z) != 5) return false; - if (world.getBlock(x - 1, y + 1, z) != Blocks.stone_slab - || world.getBlockMetadata(x - 1, y + 1, z) != 5) + if (world.getBlock(x - 1, y + 1, + z) != Blocks.stone_slab + || world.getBlockMetadata(x - 1, + y + 1, z) != 5) return false; // 2nd Layer - if (world.getBlock(x + 2, y, z) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x + 2, y, z) != 1) + if (world.getBlock(x + 2, y, + z) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x + 2, y, + z) != 1) return false; - if (world.getBlock(x + 1, y, z) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x + 1, y, z) != 4) + if (world.getBlock(x + 1, y, + z) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x + 1, y, + z) != 4) return false; - if (world.getBlock(x - 1, y, z) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x - 1, y, z) != 5) + if (world.getBlock(x - 1, y, + z) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x - 1, y, + z) != 5) return false; - if (world.getBlock(x - 2, y, z) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x - 2, y, z) != 0) + if (world.getBlock(x - 2, y, + z) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x - 2, y, + z) != 0) return false; // 3rd Layer - if (world.getBlock(x + 2, y - 1, z) != Blocks.stonebrick) + if (world.getBlock(x + 2, y - 1, + z) != Blocks.stonebrick) return false; - if (world.getBlock(x - 2, y - 1, z) != Blocks.stonebrick) + if (world.getBlock(x - 2, y - 1, + z) != Blocks.stonebrick) return false; // 4th Layer - if (world.getBlock(x + 2, y - 2, z) != Blocks.stonebrick) + if (world.getBlock(x + 2, y - 2, + z) != Blocks.stonebrick) return false; - if (world.getBlock(x - 2, y - 2, z) != Blocks.stonebrick) + if (world.getBlock(x - 2, y - 2, + z) != Blocks.stonebrick) return false; // 5th Layer - if (world.getBlock(x + 2, y - 3, z) != Blocks.stonebrick) + if (world.getBlock(x + 2, y - 3, + z) != Blocks.stonebrick) return false; - if (world.getBlock(x - 2, y - 3, z) != Blocks.stonebrick) + if (world.getBlock(x - 2, y - 3, + z) != Blocks.stonebrick) return false; } else if (world.getBlockMetadata(x, y, z) == 1 || world.getBlockMetadata(x, y, z) == 3) { // Layers from top to bottom // 1st Layer - if (world.getBlock(x, y + 1, z) != Blocks.stone_slab - || world.getBlockMetadata(x, y + 1, z) != 5) + if (world.getBlock(x, y + 1, + z) != Blocks.stone_slab + || world.getBlockMetadata(x, y + 1, + z) != 5) return false; - if (world.getBlock(x, y + 1, z + 1) != Blocks.stone_slab - || world.getBlockMetadata(x, y + 1, z + 1) != 5) + if (world.getBlock(x, y + 1, + z + 1) != Blocks.stone_slab + || world.getBlockMetadata(x, y + 1, + z + 1) != 5) return false; - if (world.getBlock(x, y + 1, z - 1) != Blocks.stone_slab - || world.getBlockMetadata(x, y + 1, z - 1) != 5) + if (world.getBlock(x, y + 1, + z - 1) != Blocks.stone_slab + || world.getBlockMetadata(x, y + 1, + z - 1) != 5) return false; // 2nd Layer - if (world.getBlock(x, y, z + 2) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x, y, z + 2) != 3) + if (world.getBlock(x, y, + z + 2) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x, y, + z + 2) != 3) return false; - if (world.getBlock(x, y, z + 1) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x, y, z + 1) != 6) + if (world.getBlock(x, y, + z + 1) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x, y, + z + 1) != 6) return false; - if (world.getBlock(x, y, z - 1) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x, y, z - 1) != 7) + if (world.getBlock(x, y, + z - 1) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x, y, + z - 1) != 7) return false; - if (world.getBlock(x, y, z - 2) != Blocks.stone_brick_stairs - || world.getBlockMetadata(x, y, z - 2) != 2) + if (world.getBlock(x, y, + z - 2) != Blocks.stone_brick_stairs + || world.getBlockMetadata(x, y, + z - 2) != 2) return false; // 3rd Layer - if (world.getBlock(x, y - 1, z + 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 1, + z + 2) != Blocks.stonebrick) return false; - if (world.getBlock(x, y - 1, z - 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 1, + z - 2) != Blocks.stonebrick) return false; // 4th Layer - if (world.getBlock(x, y - 2, z + 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 2, + z + 2) != Blocks.stonebrick) return false; - if (world.getBlock(x, y - 2, z - 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 2, + z - 2) != Blocks.stonebrick) return false; // 5th Layer - if (world.getBlock(x, y - 3, z + 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 3, + z + 2) != Blocks.stonebrick) return false; - if (world.getBlock(x, y - 3, z - 2) != Blocks.stonebrick) + if (world.getBlock(x, y - 3, + z - 2) != Blocks.stonebrick) return false; } // 3rd Layer - if (world.getBlock(x - 4, y - 1, z - 4) != BlockList.shadowBlock) + if (world.getBlock(x - 4, y - 1, + z - 4) != BlockList.shadowBlock) return false; - if (world.getBlock(x - 4, y - 1, z + 4) != BlockList.shadowBlock) + if (world.getBlock(x - 4, y - 1, + z + 4) != BlockList.shadowBlock) return false; - if (world.getBlock(x + 4, y - 1, z - 4) != BlockList.shadowBlock) + if (world.getBlock(x + 4, y - 1, + z - 4) != BlockList.shadowBlock) return false; - if (world.getBlock(x + 4, y - 1, z + 4) != BlockList.shadowBlock) + if (world.getBlock(x + 4, y - 1, + z + 4) != BlockList.shadowBlock) return false; // 4th Layer - if (world.getBlock(x - 4, y - 2, z - 4) != Blocks.stonebrick) + if (world.getBlock(x - 4, y - 2, + z - 4) != Blocks.stonebrick) return false; - if (world.getBlock(x - 4, y - 2, z + 4) != Blocks.stonebrick) + if (world.getBlock(x - 4, y - 2, + z + 4) != Blocks.stonebrick) return false; - if (world.getBlock(x + 4, y - 2, z - 4) != Blocks.stonebrick) + if (world.getBlock(x + 4, y - 2, + z - 4) != Blocks.stonebrick) return false; - if (world.getBlock(x + 4, y - 2, z + 4) != Blocks.stonebrick) + if (world.getBlock(x + 4, y - 2, + z + 4) != Blocks.stonebrick) return false; // 5th Layer // Pillars - if (world.getBlock(x - 4, y - 3, z - 4) != Blocks.stonebrick) + if (world.getBlock(x - 4, y - 3, + z - 4) != Blocks.stonebrick) return false; - if (world.getBlock(x - 4, y - 3, z + 4) != Blocks.stonebrick) + if (world.getBlock(x - 4, y - 3, + z + 4) != Blocks.stonebrick) return false; - if (world.getBlock(x + 4, y - 3, z - 4) != Blocks.stonebrick) + if (world.getBlock(x + 4, y - 3, + z - 4) != Blocks.stonebrick) return false; - if (world.getBlock(x + 4, y - 3, z + 4) != Blocks.stonebrick) + if (world.getBlock(x + 4, y - 3, + z + 4) != Blocks.stonebrick) return false; // Pedestals - if (!(world.getBlock(x, y - 3, z) instanceof BlockHandPedestal)) - return false; - if (world.getBlock(x - 4, y - 3, z + 2) != BlockList.handPedestal - || world.getBlockMetadata(x - 4, y - 3, z + 2) != 1) - return false; - if (world.getBlock(x - 5, y - 3, z) != BlockList.handPedestal - || world.getBlockMetadata(x - 5, y - 3, z) != 2) - return false; - if (world.getBlock(x - 4, y - 3, z - 2) != BlockList.handPedestal - || world.getBlockMetadata(x - 4, y - 3, z - 2) != 3) - return false; - if (world.getBlock(x - 2, y - 3, z - 4) != BlockList.handPedestal - || world.getBlockMetadata(x - 2, y - 3, z - 4) != 3) - return false; - if (world.getBlock(x, y - 3, z - 5) != BlockList.handPedestal - || world.getBlockMetadata(x, y - 3, z - 5) != 4) - return false; - if (world.getBlock(x + 2, y - 3, z - 4) != BlockList.handPedestal - || world.getBlockMetadata(x + 2, y - 3, z - 4) != 5) - return false; - if (world.getBlock(x + 4, y - 3, z - 2) != BlockList.handPedestal - || world.getBlockMetadata(x + 4, y - 3, z - 2) != 5) - return false; - if (world.getBlock(x + 5, y - 3, z) != BlockList.handPedestal - || world.getBlockMetadata(x + 5, y - 3, z) != 6) - return false; - if (world.getBlock(x + 4, y - 3, z + 2) != BlockList.handPedestal - || world.getBlockMetadata(x + 4, y - 3, z + 2) != 7) - return false; - if (world.getBlock(x + 2, y - 3, z + 4) != BlockList.handPedestal - || world.getBlockMetadata(x + 2, y - 3, z + 4) != 7) - return false; - if (world.getBlock(x, y - 3, z + 5) != BlockList.handPedestal - || world.getBlockMetadata(x, y - 3, z + 5) != 0) - return false; - if (world.getBlock(x - 2, y - 3, z + 4) != BlockList.handPedestal - || world.getBlockMetadata(x - 2, y - 3, z + 4) != 1) + if (!(world.getBlock(x, y - 3, + z) instanceof BlockHandPedestal)) + return false; + if (world.getBlock(x - 4, y - 3, + z + 2) != BlockList.handPedestal + || world.getBlockMetadata(x - 4, y - 3, + z + 2) != 1) + return false; + if (world.getBlock(x - 5, y - 3, + z) != BlockList.handPedestal + || world.getBlockMetadata(x - 5, y - 3, + z) != 2) + return false; + if (world.getBlock(x - 4, y - 3, + z - 2) != BlockList.handPedestal + || world.getBlockMetadata(x - 4, y - 3, + z - 2) != 3) + return false; + if (world.getBlock(x - 2, y - 3, + z - 4) != BlockList.handPedestal + || world.getBlockMetadata(x - 2, y - 3, + z - 4) != 3) + return false; + if (world.getBlock(x, y - 3, + z - 5) != BlockList.handPedestal + || world.getBlockMetadata(x, y - 3, + z - 5) != 4) + return false; + if (world.getBlock(x + 2, y - 3, + z - 4) != BlockList.handPedestal + || world.getBlockMetadata(x + 2, y - 3, + z - 4) != 5) + return false; + if (world.getBlock(x + 4, y - 3, + z - 2) != BlockList.handPedestal + || world.getBlockMetadata(x + 4, y - 3, + z - 2) != 5) + return false; + if (world.getBlock(x + 5, y - 3, + z) != BlockList.handPedestal + || world.getBlockMetadata(x + 5, y - 3, + z) != 6) + return false; + if (world.getBlock(x + 4, y - 3, + z + 2) != BlockList.handPedestal + || world.getBlockMetadata(x + 4, y - 3, + z + 2) != 7) + return false; + if (world.getBlock(x + 2, y - 3, + z + 4) != BlockList.handPedestal + || world.getBlockMetadata(x + 2, y - 3, + z + 4) != 7) + return false; + if (world.getBlock(x, y - 3, + z + 5) != BlockList.handPedestal + || world.getBlockMetadata(x, y - 3, + z + 5) != 0) + return false; + if (world.getBlock(x - 2, y - 3, + z + 4) != BlockList.handPedestal + || world.getBlockMetadata(x - 2, y - 3, + z + 4) != 1) return false; return true; } public void addData(World world, int x, int y, int z) { pedestalItems.clear(); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 2, - y - 3, z - 4)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 4, - y - 3, z + 2)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x, - y - 3, z - 5)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 2, - y - 3, z - 4)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 4, - y - 3, z - 2)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 5, - y - 3, z)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 4, - y - 3, z - 2)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 5, - y - 3, z)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 4, - y - 3, z + 2)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x + 2, - y - 3, z + 4)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x, - y - 3, z + 5)); - addPedestalInfo((TileEntityHandPedestal) world.getTileEntity(x - 2, - y - 3, z + 4)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x + 2, y - 3, z - 4)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x - 4, y - 3, z + 2)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x, y - 3, z - 5)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x - 2, y - 3, z - 4)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x - 4, y - 3, z - 2)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x - 5, y - 3, z)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x + 4, y - 3, z - 2)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x + 5, y - 3, z)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x + 4, y - 3, z + 2)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x + 2, y - 3, z + 4)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x, y - 3, z + 5)); + addPedestalInfo((TileEntityHandPedestal) world + .getTileEntity(x - 2, y - 3, z + 4)); } public int getNumberOfItems(World world, int x, int y, int z) { int items = 0; - if (((TileEntityHandPedestal) world.getTileEntity(x + 2, y - 3, - z - 4)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x + 2, + y - 3, z - 4)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x - 4, y - 3, - z + 2)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x - 4, + y - 3, z + 2)).heldItemStack != null) items++; if (((TileEntityHandPedestal) world.getTileEntity(x, y - 3, z - 5)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x - 2, y - 3, - z - 4)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x - 2, + y - 3, z - 4)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x - 4, y - 3, - z - 2)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x - 4, + y - 3, z - 2)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x - 5, y - 3, - z)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x - 5, + y - 3, z)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x + 4, y - 3, - z - 2)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x + 4, + y - 3, z - 2)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x + 5, y - 3, - z)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x + 5, + y - 3, z)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x + 4, y - 3, - z + 2)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x + 4, + y - 3, z + 2)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x + 2, y - 3, - z + 4)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x + 2, + y - 3, z + 4)).heldItemStack != null) items++; if (((TileEntityHandPedestal) world.getTileEntity(x, y - 3, z + 5)).heldItemStack != null) items++; - if (((TileEntityHandPedestal) world.getTileEntity(x - 2, y - 3, - z + 4)).heldItemStack != null) + if (((TileEntityHandPedestal) world.getTileEntity(x - 2, + y - 3, z + 4)).heldItemStack != null) items++; return items; } - public boolean canChangePedestals(World world, int x, int y, int z) { + public boolean canChangePedestals(World world, int x, int y, + int z) { if (world.getBlock(x, y - 3, z) != BlockList.handPedestal) return false; - if (world.getBlock(x + 2, y - 3, z - 4) != BlockList.handPedestal) + if (world.getBlock(x + 2, y - 3, + z - 4) != BlockList.handPedestal) return false; - if (world.getBlock(x - 4, y - 3, z + 2) != BlockList.handPedestal) + if (world.getBlock(x - 4, y - 3, + z + 2) != BlockList.handPedestal) return false; - if (world.getBlock(x, y - 3, z - 5) != BlockList.handPedestal) + if (world.getBlock(x, y - 3, + z - 5) != BlockList.handPedestal) return false; - if (world.getBlock(x - 2, y - 3, z - 4) != BlockList.handPedestal) + if (world.getBlock(x - 2, y - 3, + z - 4) != BlockList.handPedestal) return false; - if (world.getBlock(x - 4, y - 3, z - 2) != BlockList.handPedestal) + if (world.getBlock(x - 4, y - 3, + z - 2) != BlockList.handPedestal) return false; - if (world.getBlock(x - 5, y - 3, z) != BlockList.handPedestal) + if (world.getBlock(x - 5, y - 3, + z) != BlockList.handPedestal) return false; - if (world.getBlock(x + 4, y - 3, z - 2) != BlockList.handPedestal) + if (world.getBlock(x + 4, y - 3, + z - 2) != BlockList.handPedestal) return false; - if (world.getBlock(x + 5, y - 3, z) != BlockList.handPedestal) + if (world.getBlock(x + 5, y - 3, + z) != BlockList.handPedestal) return false; - if (world.getBlock(x + 4, y - 3, z + 2) != BlockList.handPedestal) + if (world.getBlock(x + 4, y - 3, + z + 2) != BlockList.handPedestal) return false; - if (world.getBlock(x + 2, y - 3, z + 4) != BlockList.handPedestal) + if (world.getBlock(x + 2, y - 3, + z + 4) != BlockList.handPedestal) return false; - if (world.getBlock(x, y - 3, z + 5) != BlockList.handPedestal) + if (world.getBlock(x, y - 3, + z + 5) != BlockList.handPedestal) return false; - if (world.getBlock(x - 2, y - 3, z + 4) != BlockList.handPedestal) + if (world.getBlock(x - 2, y - 3, + z + 4) != BlockList.handPedestal) return false; return true; } @@ -419,20 +525,25 @@ public class TileEntityShadowEye extends TileEntity { public void changeHand(World world, int x, int y, int z) { int l = world.getBlockMetadata(x, y, z); - world.playAuxSFX(2001, x, y, z, - Block.getIdFromBlock(world.getBlock(x, y, z))); + world.playAuxSFX(2001, x, y, z, Block + .getIdFromBlock(world.getBlock(x, y, z))); TileEntityShadowHand tile = new TileEntityShadowHand(); if (world.getTileEntity(x, y, z) instanceof TileEntityHandPedestal) { - if (((TileEntityHandPedestal) world.getTileEntity(x, y, - z)).heldItemStack != null) - tile.setHeldItemStack(((TileEntityHandPedestal) world - .getTileEntity(x, y, z)).heldItemStack.copy()); + if (((TileEntityHandPedestal) world.getTileEntity( + x, y, z)).heldItemStack != null) + tile.setHeldItemStack( + ((TileEntityHandPedestal) world + .getTileEntity(x, + y, + z)).heldItemStack + .copy()); if (tile.heldItemStack != null) tile.closeHand(); - ((TileEntityHandPedestal) world.getTileEntity(x, y, z)) - .removeHeldItemStack(); - world.setBlock(x, y, z, BlockList.shadowHand, l, 2); + ((TileEntityHandPedestal) world.getTileEntity(x, y, + z)).removeHeldItemStack(); + world.setBlock(x, y, z, BlockList.shadowHand, l, + 2); world.setTileEntity(x, y, z, tile); } } @@ -455,51 +566,66 @@ public class TileEntityShadowEye extends TileEntity { public void revertHand(World world, int x, int y, int z) { int l = world.getBlockMetadata(x, y, z); - world.playAuxSFX(2001, x, y, z, - Block.getIdFromBlock(BlockList.handPedestal)); + world.playAuxSFX(2001, x, y, z, Block + .getIdFromBlock(BlockList.handPedestal)); world.playSoundEffect(x, y + 0.5F, z, "step.wood", 1F, 1F); TileEntityHandPedestal tile = new TileEntityHandPedestal(); - if (world.getTileEntity(x, y, z) instanceof TileEntityShadowHand) { - if (((TileEntityShadowHand) world.getTileEntity(x, y, - z)).heldItemStack != null) - tile.setHeldItemStack(((TileEntityShadowHand) world - .getTileEntity(x, y, z)).heldItemStack.copy()); - ((TileEntityShadowHand) world.getTileEntity(x, y, z)) - .removeHeldItemStack(); - world.setBlock(x, y, z, BlockList.handPedestal, l, 2); + if (world.getTileEntity(x, y, + z) instanceof TileEntityShadowHand) { + if (((TileEntityShadowHand) world.getTileEntity(x, + y, z)).heldItemStack != null) + tile.setHeldItemStack( + ((TileEntityShadowHand) world + .getTileEntity(x, + y, + z)).heldItemStack + .copy()); + ((TileEntityShadowHand) world.getTileEntity(x, y, + z)).removeHeldItemStack(); + world.setBlock(x, y, z, BlockList.handPedestal, l, + 2); world.setTileEntity(x, y, z, tile); } } public void addPedestalInfo(TileEntityHandPedestal pedestal) { ItemStack heldItemStack; - if (pedestal != null - && (heldItemStack = pedestal.getHeldItemStack()) != null) { + if (pedestal != null && (heldItemStack = pedestal + .getHeldItemStack()) != null) { if (pedestalItems.isEmpty()) pedestalItems.add(heldItemStack.copy()); else { boolean hasItem = false; int index = 0; - for (int ind = 0; ind < pedestalItems.size() && !hasItem; - ind++) - if (heldItemStack.getItem() - .equals(pedestalItems.get(ind).getItem()) - && heldItemStack - .getItemDamage() == pedestalItems - .get(ind).getItemDamage()) { + for (int ind = 0; ind < pedestalItems + .size() && !hasItem; ind++) + if (heldItemStack.getItem().equals( + pedestalItems.get( + ind) + .getItem()) + && heldItemStack.getItemDamage() == pedestalItems + .get(ind) + .getItemDamage()) { index = ind; hasItem = true; - if (heldItemStack.hasTagCompound() - && pedestalItems.get(ind).hasTagCompound() - && !heldItemStack.getTagCompound() - .equals(pedestalItems.get(ind) + if (heldItemStack + .hasTagCompound() + && pedestalItems.get( + ind) + .hasTagCompound() + && !heldItemStack + .getTagCompound() + .equals(pedestalItems + .get(ind) .getTagCompound())) hasItem = false; } if (!hasItem) - pedestalItems.add(heldItemStack.copy()); + pedestalItems.add(heldItemStack + .copy()); else { - ItemStack object = pedestalItems.get(index).copy(); + ItemStack object = pedestalItems + .get(index).copy(); object.stackSize++; pedestalItems.set(index, object); } @@ -513,9 +639,10 @@ public class TileEntityShadowEye extends TileEntity { @Override @SideOnly(Side.CLIENT) public AxisAlignedBB getRenderBoundingBox() { - AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(xCoord - 5.5D, - yCoord - 5.5D, zCoord - 5.5D, xCoord + 5.5D, yCoord + 5.5D, - zCoord + 5.5D); + AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( + xCoord - 5.5D, yCoord - 5.5D, + zCoord - 5.5D, xCoord + 5.5D, + yCoord + 5.5D, zCoord + 5.5D); return bb; } @@ -523,8 +650,8 @@ public class TileEntityShadowEye extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } @Override diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java index 2f170f9..dd73951 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntitySmelter.java @@ -14,7 +14,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; public class TileEntitySmelter extends TileEntity { - public int melting, flow, n = 0, p = 0; + public int melting, flow, n = 0, p = 0; public boolean hasMetal, hasMoltenMetal, isDirty, pouring; public ItemStack metal, moltenMetal; public float quantity, pouredQuantity = 0.1f; @@ -78,7 +78,8 @@ public class TileEntitySmelter extends TileEntity { super.updateEntity(); Random rand = new Random(); if (isDirty) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, + zCoord); isDirty = false; } if (p > 0) @@ -97,8 +98,10 @@ public class TileEntitySmelter extends TileEntity { } if (hasMetal) for (int l = 0; l < 2; ++l) - worldObj.spawnParticle("flame", xCoord + rand.nextFloat(), - (double) yCoord + 0.3F, zCoord + rand.nextFloat(), + worldObj.spawnParticle("flame", + xCoord + rand.nextFloat(), + (double) yCoord + 0.3F, + zCoord + rand.nextFloat(), 0.0D, 0.0D, 0.0D); if (rand.nextInt(65) == 0) { double d5 = xCoord + rand.nextFloat(); @@ -106,7 +109,8 @@ public class TileEntitySmelter extends TileEntity { double d6 = zCoord + rand.nextFloat(); worldObj.playSound(d5, d7, d6, "liquid.lavapop", 0.2F + rand.nextFloat() * 0.2F, - 0.9F + rand.nextFloat() * 0.15F, false); + 0.9F + rand.nextFloat() * 0.15F, + false); } if (hasMetal && !hasMoltenMetal) { boolean isOre = JewelrycraftUtil.isOre(metal); @@ -115,12 +119,16 @@ public class TileEntitySmelter extends TileEntity { if (melting == 0) { hasMetal = false; if (!isOre) { - if (JewelryNBT.ingot(metal) == null) + if (JewelryNBT.ingot( + metal) == null) moltenMetal = metal; else - moltenMetal = JewelryNBT.ingot(metal); + moltenMetal = JewelryNBT + .ingot(metal); } else { - moltenMetal = JewelrycraftUtil.getIngotFromOre(metal); + moltenMetal = JewelrycraftUtil + .getIngotFromOre( + metal); moltenMetal.stackSize *= 2; } hasMoltenMetal = true; @@ -128,7 +136,8 @@ public class TileEntitySmelter extends TileEntity { quantity = 0.1f * metal.stackSize; else quantity = 0.2f * metal.stackSize; - metal = new ItemStack(Item.getItemById(0), 0, 0); + metal = new ItemStack(Item.getItemById(0), + 0, 0); melting = -1; isDirty = true; } @@ -141,12 +150,14 @@ public class TileEntitySmelter extends TileEntity { if (!isOre) moltenMetal.stackSize += metal.stackSize; else - moltenMetal.stackSize += metal.stackSize * 2; + moltenMetal.stackSize += metal.stackSize + * 2; if (!isOre) quantity += 0.1f * metal.stackSize; else quantity += 0.2f * metal.stackSize; - metal = new ItemStack(Item.getItemById(0), 0, 0); + metal = new ItemStack(Item.getItemById(0), + 0, 0); melting = -1; isDirty = true; } @@ -157,29 +168,34 @@ public class TileEntitySmelter extends TileEntity { zCoord - 1) != null && worldObj.getTileEntity(xCoord, yCoord, zCoord - 1) instanceof TileEntityMolder) - me = (TileEntityMolder) worldObj.getTileEntity(xCoord, yCoord, - zCoord - 1); - else if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 1 - && worldObj.getTileEntity(xCoord + 1, yCoord, - zCoord) != null - && worldObj.getTileEntity(xCoord + 1, yCoord, + me = (TileEntityMolder) worldObj.getTileEntity( + xCoord, yCoord, zCoord - 1); + else if (worldObj.getBlockMetadata(xCoord, yCoord, + zCoord) == 1 + && worldObj.getTileEntity(xCoord + 1, + yCoord, zCoord) != null + && worldObj.getTileEntity(xCoord + 1, + yCoord, zCoord) instanceof TileEntityMolder) - me = (TileEntityMolder) worldObj.getTileEntity(xCoord + 1, - yCoord, zCoord); - else if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 2 + me = (TileEntityMolder) worldObj.getTileEntity( + xCoord + 1, yCoord, zCoord); + else if (worldObj.getBlockMetadata(xCoord, yCoord, + zCoord) == 2 && worldObj.getTileEntity(xCoord, yCoord, zCoord + 1) != null && worldObj.getTileEntity(xCoord, yCoord, zCoord + 1) instanceof TileEntityMolder) - me = (TileEntityMolder) worldObj.getTileEntity(xCoord, yCoord, - zCoord + 1); - else if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 3 - && worldObj.getTileEntity(xCoord - 1, yCoord, - zCoord) != null - && worldObj.getTileEntity(xCoord - 1, yCoord, + me = (TileEntityMolder) worldObj.getTileEntity( + xCoord, yCoord, zCoord + 1); + else if (worldObj.getBlockMetadata(xCoord, yCoord, + zCoord) == 3 + && worldObj.getTileEntity(xCoord - 1, + yCoord, zCoord) != null + && worldObj.getTileEntity(xCoord - 1, + yCoord, zCoord) instanceof TileEntityMolder) - me = (TileEntityMolder) worldObj.getTileEntity(xCoord - 1, - yCoord, zCoord); + me = (TileEntityMolder) worldObj.getTileEntity( + xCoord - 1, yCoord, zCoord); if (pouring && pouredQuantity > 0f) { quantity -= 0.01f; pouredQuantity -= 0.01f; @@ -196,7 +212,8 @@ public class TileEntitySmelter extends TileEntity { if (quantity <= 0f) { quantity = 0f; hasMoltenMetal = false; - moltenMetal = new ItemStack(Item.getItemById(0), 0, 0); + moltenMetal = new ItemStack( + Item.getItemById(0), 0, 0); me.cooling = ConfigHandler.INGOT_COOLING_TIME; } me.isDirty = true; @@ -210,8 +227,8 @@ public class TileEntitySmelter extends TileEntity { public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, - nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, + zCoord, 1, nbttagcompound); } /** diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java index f20c853..aaf4613 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityDisplayerRender.java @@ -49,12 +49,9 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer { } } - ModelDisplayer displayer = - new ModelDisplayer(); - String texture = - "textures/tileentities/Displayer.png"; - HashMap colors = - new ChatColorMap(); + ModelDisplayer displayer = new ModelDisplayer(); + String texture = "textures/tileentities/Displayer.png"; + HashMap colors = new ChatColorMap(); @Override public void renderTileEntityAt(TileEntity te, double x, double y, @@ -63,34 +60,48 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer { GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); TileEntityDisplayer disp = (TileEntityDisplayer) te; - ResourceLocation blockTexture = - new ResourceLocation(Variables.MODID, texture); - Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture); + ResourceLocation blockTexture = new ResourceLocation( + Variables.MODID, texture); + Minecraft.getMinecraft().renderEngine + .bindTexture(blockTexture); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); displayer.render((Entity) null, disp.ringTranslation1, - disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, + disp.ringTranslation2, + disp.ringTranslation3, 0.0F, 0.0F, 0.0625F); try { int block = disp.getBlockMetadata(); - if (disp != null && disp.hasObject && disp.object != null + if (disp != null && disp.hasObject + && disp.object != null && disp.object.getItem() != null - && disp.object != new ItemStack(Item.getItemById(0), 0, - 0)) { + && disp.object != new ItemStack( + Item.getItemById( + 0), + 0, 0)) { int ind = -3; GL11.glPushMatrix(); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, disp.object); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, disp.object); entityitem.hoverStart = 0.0F; disp.object.stackSize = 1; GL11.glRotatef(180F, 1F, 0F, 0F); - GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, + GL11.glTranslatef(0.0F, -0.6F + + disp.ringTranslation1 + / 5, 0F); GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F); GL11.glColor4f(1F, 1F, 1F, 1F); if (RenderManager.instance.options.fancyGraphics) - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); else { GL11.glRotatef(180F, 0F, 1F, 0F); RenderManager.instance.options.fancyGraphics = true; @@ -98,57 +109,95 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer { int j = i % 65536; int k = i / 65536; OpenGlHelper.setLightmapTextureCoords( - OpenGlHelper.lightmapTexUnit, j / 1.0F, + OpenGlHelper.lightmapTexUnit, + j / 1.0F, k / 1.0F); - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); RenderManager.instance.options.fancyGraphics = false; } - EntityPlayer player = te.getWorldObj().getClosestPlayer( - te.xCoord, te.yCoord, te.zCoord, 5D); + EntityPlayer player = te.getWorldObj() + .getClosestPlayer( + te.xCoord, + te.yCoord, + te.zCoord, + 5D); GL11.glPopMatrix(); GL11.glPushMatrix(); if (player != null) - renderLabel(disp.object.getDisplayName(), 0F, - -0.171F * ind, 0F, block, disp, colors.get( - disp.object.getRarity().rarityColor)); + renderLabel(disp.object + .getDisplayName(), + 0F, -0.171F * ind, + 0F, block, disp, + colors.get(disp.object + .getRarity().rarityColor)); GL11.glPopMatrix(); ind++; if (player != null && disp.quantity > 1) { GL11.glPushMatrix(); - renderLabel("x" + Integer.toString(disp.quantity), 0F, - -0.171F * ind, 0F, block, disp, + renderLabel("x" + Integer.toString( + disp.quantity), 0F, + -0.171F * ind, 0F, + block, disp, Color.GRAY.getRGB()); GL11.glPopMatrix(); ind++; } - if (disp.object.getItem() != Items.map && player != null - && disp.object.getTooltip(player, true) != null) { - List tooltips = - disp.object.getTooltip(player, true); - if (disp.infoIndex + 5 > tooltips.size()) + if (disp.object.getItem() != Items.map + && player != null + && disp.object.getTooltip( + player, + true) != null) { + List tooltips = disp.object + .getTooltip(player, + true); + if (disp.infoIndex + 5 > tooltips + .size()) disp.infoIndex = 1; if (tooltips.size() < 5) - for (int i = 1; i < tooltips.size(); i++) { - String tooltip = tooltips.get(i).toString(); - RenderManager.instance.getFontRenderer(); + for (int i = 1; i < tooltips + .size(); i++) { + String tooltip = tooltips + .get(i) + .toString(); + RenderManager.instance + .getFontRenderer(); if (tooltip != "") { GL11.glPushMatrix(); - renderLabel(tooltip, 0F, -0.171F * ind, 0F, - block, disp, Color.GRAY.getRGB()); + renderLabel(tooltip, + 0F, + -0.171F * ind, + 0F, + block, + disp, + Color.GRAY.getRGB()); GL11.glPopMatrix(); ind++; } } else - for (int i = disp.infoIndex; - i < disp.infoIndex + 5; i++) { - String tooltip = tooltips.get(i).toString(); - RenderManager.instance.getFontRenderer(); + for (int i = disp.infoIndex; i < disp.infoIndex + + 5; i++) { + String tooltip = tooltips + .get(i) + .toString(); + RenderManager.instance + .getFontRenderer(); if (tooltip != "") { GL11.glPushMatrix(); - renderLabel(tooltip, 0F, -0.171F * ind, 0F, - block, disp, Color.GRAY.getRGB()); + renderLabel(tooltip, + 0F, + -0.171F * ind, + 0F, + block, + disp, + Color.GRAY.getRGB()); GL11.glPopMatrix(); ind++; } @@ -161,10 +210,10 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - protected void renderLabel(String text, double x, double y, double z, - int metadata, TileEntity te, int color) { - FontRenderer fontrenderer = - RenderManager.instance.getFontRenderer(); + protected void renderLabel(String text, double x, double y, + double z, int metadata, TileEntity te, int color) { + FontRenderer fontrenderer = RenderManager.instance + .getFontRenderer(); float width = 0.015F, height = 1F; GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glRotatef(360 - metadata * 90F, 0F, 1F, 0F); @@ -184,21 +233,31 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer { tessellator.draw(); if (fontrenderer.getStringWidth(text) / 2 > 20) { width = 0.9F / fontrenderer.getStringWidth(text); - height = 1F - fontrenderer.getStringWidth(text) / 20 * 0.06F; + height = 1F - fontrenderer.getStringWidth(text) + / 20 * 0.06F; } - GL11.glTranslatef((float) x + 1f, (float) y + 1f, (float) z); + GL11.glTranslatef((float) x + 1f, (float) y + 1f, + (float) z); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glScalef(width * 70F, height, 0F); fontrenderer.drawString( - text.replaceFirst("�0", "�r").replaceFirst("�1", "�r") - .replaceFirst("�2", "�r").replaceFirst("�3", "�r") - .replaceFirst("�4", "�r").replaceFirst("�5", "�r") - .replaceFirst("�6", "�r").replaceFirst("�7", "�r") - .replaceFirst("�8", "�r").replaceFirst("�9", "�r") - .replaceFirst("�a", "�r").replaceFirst("�b", "�r") - .replaceFirst("�c", "�r").replaceFirst("�d", "�r") - .replaceFirst("�e", "�r").replaceFirst("�f", "�r"), + text.replaceFirst("�0", "�r") + .replaceFirst("�1", "�r") + .replaceFirst("�2", "�r") + .replaceFirst("�3", "�r") + .replaceFirst("�4", "�r") + .replaceFirst("�5", "�r") + .replaceFirst("�6", "�r") + .replaceFirst("�7", "�r") + .replaceFirst("�8", "�r") + .replaceFirst("�9", "�r") + .replaceFirst("�a", "�r") + .replaceFirst("�b", "�r") + .replaceFirst("�c", "�r") + .replaceFirst("�d", "�r") + .replaceFirst("�e", "�r") + .replaceFirst("�f", "�r"), -j, 0, 1973790); GL11.glPopMatrix(); GL11.glTranslatef((float) x - 0.5f, (float) y - 0.5f, diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityHandPedestalRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityHandPedestalRender.java index 4dcdb1e..da8fa58 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityHandPedestalRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityHandPedestalRender.java @@ -42,9 +42,9 @@ public class TileEntityHandPedestalRender TileEntityHandPedestal pedestal = (TileEntityHandPedestal) te; bindTexture(texture); GL11.glRotatef(180, 0, 0, 1); - GL11.glRotatef( - pedestal.getWorldObj() == null ? 180 - : pedestal.getBlockMetadata() % 8 / 8F * 360, + GL11.glRotatef(pedestal.getWorldObj() == null ? 180 + : pedestal.getBlockMetadata() % 8 / 8F + * 360, 0, 1, 0); model.render(pedestal, partialRenderTicks, 0.0625F); GL11.glPopMatrix(); diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java index a62d21d..fbe3db6 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityJewelrsCraftingTableRender.java @@ -19,10 +19,8 @@ import net.minecraft.world.World; public class TileEntityJewelrsCraftingTableRender extends TileEntitySpecialRenderer { - ModelJewlersCraftingBench modelTable = - new ModelJewlersCraftingBench(); - String texture = - "textures/tileentities/JewelrsCraftingBench.png"; + ModelJewlersCraftingBench modelTable = new ModelJewlersCraftingBench(); + String texture = "textures/tileentities/JewelrsCraftingBench.png"; /** * @param te @@ -37,11 +35,11 @@ public class TileEntityJewelrsCraftingTableRender GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); - ResourceLocation blockTexture = - new ResourceLocation(Variables.MODID, texture); - Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture); - TileEntityJewelrsCraftingTable jt = - (TileEntityJewelrsCraftingTable) te; + ResourceLocation blockTexture = new ResourceLocation( + Variables.MODID, texture); + Minecraft.getMinecraft().renderEngine + .bindTexture(blockTexture); + TileEntityJewelrsCraftingTable jt = (TileEntityJewelrsCraftingTable) te; GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); try { @@ -57,15 +55,18 @@ public class TileEntityJewelrsCraftingTableRender } } catch (Exception e) { } - modelTable.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, - 0.0625F); + modelTable.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, + 0.0F, 0.0625F); if (jt != null) { - if (jt.hasJewelry && jt.jewelry.getIconIndex() != null - && jt.jewelry.getIconIndex().getIconName() != "") { + if (jt.hasJewelry && jt.jewelry + .getIconIndex() != null + && jt.jewelry.getIconIndex() + .getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, jt.jewelry); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, jt.jewelry); entityitem.getEntityItem().stackSize = 1; entityitem.hoverStart = 0.0F; GL11.glRotatef(180F, 1F, 0F, 0F); @@ -73,24 +74,37 @@ public class TileEntityJewelrsCraftingTableRender GL11.glTranslatef(0.55F, -1.5F, -0.45F); GL11.glRotatef(jt.angle, 0F, 1F, 0F); if (RenderManager.instance.options.fancyGraphics) - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); else { GL11.glRotatef(180F, 0F, 1F, 0F); RenderManager.instance.options.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); RenderManager.instance.options.fancyGraphics = false; } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } - if (jt.hasEndItem - && jt.endItem.getIconIndex().getIconName() != "") { + if (jt.hasEndItem && jt.endItem.getIconIndex() + .getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, jt.endItem); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, jt.endItem); entityitem.getEntityItem().stackSize = 1; entityitem.hoverStart = 0.0F; GL11.glRotatef(180F, 1F, 0F, 0F); @@ -98,23 +112,37 @@ public class TileEntityJewelrsCraftingTableRender GL11.glTranslatef(0.0F, -1.6F, 0.6F); GL11.glRotatef(jt.angle, 0F, 1F, 0F); if (RenderManager.instance.options.fancyGraphics) - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); else { GL11.glRotatef(180F, 0F, 1F, 0F); RenderManager.instance.options.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); RenderManager.instance.options.fancyGraphics = false; } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } - if (jt.hasGem && jt.gem.getIconIndex().getIconName() != "") { + if (jt.hasGem && jt.gem.getIconIndex() + .getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, jt.gem); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, jt.gem); entityitem.getEntityItem().stackSize = 1; entityitem.hoverStart = 0.0F; GL11.glRotatef(180F, 1F, 0F, 0F); @@ -122,13 +150,25 @@ public class TileEntityJewelrsCraftingTableRender GL11.glTranslatef(-0.55F, -1.5F, -0.45F); GL11.glRotatef(jt.angle, 0F, 1F, 0F); if (RenderManager.instance.options.fancyGraphics) - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); else { GL11.glRotatef(180F, 0F, 1F, 0F); RenderManager.instance.options.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); RenderManager.instance.options.fancyGraphics = false; } GL11.glEnable(GL11.GL_LIGHTING); @@ -150,11 +190,13 @@ public class TileEntityJewelrsCraftingTableRender Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getLightOpacity(world, i, j, k); - int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); + int skyLight = world.getLightBrightnessForSkyBlocks(i, j, + k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, + OpenGlHelper.setLightmapTextureCoords( + OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier); } } diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMidasTouchRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMidasTouchRender.java index bf0a385..f423bc8 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMidasTouchRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMidasTouchRender.java @@ -20,11 +20,12 @@ public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer { target.hurtTime = 0; GL11.glTranslatef(0.5F, 0.0F, 0.5F); GL11.glColor3f(1.0F, 1.0F, 0.0F); - RenderManager.instance.renderEntityWithPosYaw(target, + RenderManager.instance.renderEntityWithPosYaw( + target, midas.xCoord - RenderManager.renderPosX, midas.yCoord - RenderManager.renderPosY, - midas.zCoord - RenderManager.renderPosZ, 0F, - 1F); + midas.zCoord - RenderManager.renderPosZ, + 0F, 1F); } else { GL11.glTranslatef(0.5F, 0.0F, 0.5F); GL11.glColor3f(1.0F, 1.0F, 0.0F); @@ -32,8 +33,8 @@ public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer { new EntityPig(te.getWorldObj()), midas.xCoord - RenderManager.renderPosX, midas.yCoord - RenderManager.renderPosY, - midas.zCoord - RenderManager.renderPosZ, 0F, - 1F); + midas.zCoord - RenderManager.renderPosZ, + 0F, 1F); } GL11.glPopMatrix(); } diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java index 6f55e1c..c93a09b 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityMolderRender.java @@ -42,9 +42,10 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer { (float) z + 0.5F); TileEntityMolder me = (TileEntityMolder) te; String texture = "textures/tileentities/Molder.png"; - ResourceLocation blockTexture = - new ResourceLocation(Variables.MODID, texture); - Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture); + ResourceLocation blockTexture = new ResourceLocation( + Variables.MODID, texture); + Minecraft.getMinecraft().renderEngine + .bindTexture(blockTexture); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); try { @@ -60,15 +61,16 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer { } } catch (Exception e) { } - modelMolder.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, - 0.0625F); - boolean fancyGraphics = - Minecraft.getMinecraft().gameSettings.fancyGraphics; + modelMolder.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, + 0.0F, 0.0625F); + boolean fancyGraphics = Minecraft + .getMinecraft().gameSettings.fancyGraphics; if (me != null) { if (me.hasMold) { GL11.glPushMatrix(); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, me.mold); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, me.mold); entityitem.getEntityItem().stackSize = 1; entityitem.hoverStart = 0.0F; GL11.glTranslatef(0F, 1.43F, -0.28F); @@ -76,23 +78,37 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer { GL11.glRotatef(90F, 1F, 0F, 0f); Minecraft.getMinecraft().gameSettings.fancyGraphics = true; if (entityitem != null) { - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.03D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.0D, + 0.0F, + 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.03D, + 0.0F, + 0.0F); } - Minecraft.getMinecraft().gameSettings.fancyGraphics = - fancyGraphics; + Minecraft.getMinecraft().gameSettings.fancyGraphics = fancyGraphics; GL11.glPopMatrix(); } if (me.hasJewelBase && me.jewelBase != null && me.jewelBase.getItem() != Item - .getItemFromBlock(Blocks.air) + .getItemFromBlock( + Blocks.air) && me.jewelBase.getIconIndex() != null - && me.jewelBase.getIconIndex().getIconName() != "") { + && me.jewelBase.getIconIndex() + .getIconName() != "") { GL11.glPushMatrix(); - EntityItem entityitem = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, me.jewelBase); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, me.jewelBase); entityitem.getEntityItem().stackSize = 1; entityitem.hoverStart = 0.0F; GL11.glTranslatef(0F, 1.4F, -0.28F); @@ -100,36 +116,51 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer { GL11.glRotatef(90F, 1F, 0F, 0f); Minecraft.getMinecraft().gameSettings.fancyGraphics = true; if (entityitem != null) - RenderManager.instance.renderEntityWithPosYaw( - entityitem, 0.0D, 0.0D, 0.01D, 0.0F, 0.0F); - Minecraft.getMinecraft().gameSettings.fancyGraphics = - fancyGraphics; + RenderManager.instance + .renderEntityWithPosYaw( + entityitem, + 0.0D, + 0.0D, + 0.01D, + 0.0F, + 0.0F); + Minecraft.getMinecraft().gameSettings.fancyGraphics = fancyGraphics; GL11.glColor4f(1, 1F, 1F, 1.0F); GL11.glPopMatrix(); } if (me.hasMoltenMetal && me.moltenMetal != null - && me.moltenMetal != new ItemStack(Item.getItemById(0), + && me.moltenMetal != new ItemStack( + Item.getItemById( + 0), 0, 0)) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); if (JewelrycraftMod.fancyRender) { GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(1, 1, 0, 0); + OpenGlHelper.glBlendFunc(1, 1, 0, + 0); } - ItemStack metal = new ItemStack(ItemList.metal); + ItemStack metal = new ItemStack( + ItemList.metal); ItemStack ingot = me.moltenMetal.copy(); JewelryNBT.addMetal(metal, ingot); - EntityItem moltenMetal = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, metal); + EntityItem moltenMetal = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, metal); moltenMetal.getEntityItem().stackSize = 1; moltenMetal.hoverStart = 0.0F; - GL11.glTranslatef(-0F, 1.4f - 0.005f * me.quantity, + GL11.glTranslatef(-0F, 1.4f + - 0.005f * me.quantity, -0.29F); GL11.glScalef(1.2F, 1.0F, 1.4F); GL11.glRotatef(90F, 1F, 0F, 0f); RenderItem.renderInFrame = true; - RenderManager.instance.renderEntityWithPosYaw(moltenMetal, - 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + moltenMetal, + 0.0D, 0.0D, + 0.0D, 0.0F, + 0.0F); RenderItem.renderInFrame = false; if (JewelrycraftMod.fancyRender) GL11.glDisable(GL11.GL_BLEND); @@ -152,11 +183,13 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer { Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getLightOpacity(world, i, j, k); - int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); + int skyLight = world.getLightBrightnessForSkyBlocks(i, j, + k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, + OpenGlHelper.setLightmapTextureCoords( + OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier); } } diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java index 60277a2..5e191ec 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java @@ -19,8 +19,8 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { - ModelShadowEye eye = new ModelShadowEye(); - Sphere shadow = new Sphere(); + ModelShadowEye eye = new ModelShadowEye(); + Sphere shadow = new Sphere(); /** * @param te @@ -36,11 +36,12 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { GL11.glTranslatef((float) x + 0.5F, (float) y + 1.6F, (float) z + 0.5F); TileEntityShadowEye eyeS = (TileEntityShadowEye) te; - String texture = - "textures/tileentities/ShadowEye" + eyeS.opening + ".png"; - ResourceLocation blockTexture = - new ResourceLocation(Variables.MODID, texture); - Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture); + String texture = "textures/tileentities/ShadowEye" + + eyeS.opening + ".png"; + ResourceLocation blockTexture = new ResourceLocation( + Variables.MODID, texture); + Minecraft.getMinecraft().renderEngine + .bindTexture(blockTexture); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); try { @@ -54,23 +55,32 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { } catch (Exception e) { } if (te != null && te.getWorldObj() != null) { - EntityPlayer player = te.getWorldObj().getClosestPlayer( - te.xCoord, te.yCoord, te.zCoord, 16D); + EntityPlayer player = te.getWorldObj() + .getClosestPlayer(te.xCoord, + te.yCoord, + te.zCoord, 16D); if (player != null) { - float x1 = (float) (te.xCoord - player.posX) + 0.5F; - float y1 = (float) (te.yCoord - player.posY) + 0.5F; - float z1 = (float) (te.zCoord - player.posZ) + 0.5F; + float x1 = (float) (te.xCoord + - player.posX) + 0.5F; + float y1 = (float) (te.yCoord + - player.posY) + 0.5F; + float z1 = (float) (te.zCoord + - player.posZ) + 0.5F; eyeS.model.render(player, 0, - (float) (x1 >= 0 ? Math.atan(z1 / x1) - : Math.PI + Math.atan(z1 / x1)), - (float) (y1 >= 0 ? Math.atan(y1 / x1) + (float) (x1 >= 0 ? Math + .atan(z1 / x1) + : Math.PI + Math.atan( + z1 / x1)), + (float) (y1 >= 0 ? Math + .atan(y1 / x1) : Math.atan(y1 / x1)), - te.blockMetadata, eyeS.opening, 0.0625F); + te.blockMetadata, + eyeS.opening, 0.0625F); } } else - eyeS.model.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, - 0.0625F); + eyeS.model.render((Entity) null, 0.0F, 0.0F, 0.0F, + 0.0F, 0.0F, 0.0625F); if (eyeS.opening == 4) { GL11.glPushMatrix(); @@ -104,11 +114,13 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getLightOpacity(world, i, j, k); - int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); + int skyLight = world.getLightBrightnessForSkyBlocks(i, j, + k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, + OpenGlHelper.setLightmapTextureCoords( + OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier); } } diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java index 1cbd32c..b694afa 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntitySmelterRender.java @@ -21,9 +21,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class TileEntitySmelterRender extends TileEntitySpecialRenderer { - ModelSmelter modelSmelter = new ModelSmelter(); - public static final float p = 1 / 16, p3 = 3 * p, - p13 = 13 * p, p15 = 15 * p; + ModelSmelter modelSmelter = new ModelSmelter(); + public static final float p = 1 / 16, + p3 = 3 * p, p13 = 13 * p, p15 = 15 * p; /** * @param te @@ -39,9 +39,10 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); String texture = "textures/tileentities/Smelter.png"; - ResourceLocation blockTexture = - new ResourceLocation(Variables.MODID, texture); - Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture); + ResourceLocation blockTexture = new ResourceLocation( + Variables.MODID, texture); + Minecraft.getMinecraft().renderEngine + .bindTexture(blockTexture); TileEntitySmelter st = (TileEntitySmelter) te; GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); try { @@ -57,10 +58,10 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { } } catch (Exception e) { } - boolean fancyGraphics = - Minecraft.getMinecraft().gameSettings.fancyGraphics; - modelSmelter.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, - 0.0625F); + boolean fancyGraphics = Minecraft + .getMinecraft().gameSettings.fancyGraphics; + modelSmelter.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, + 0.0F, 0.0625F); if (scale != 0) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); @@ -68,8 +69,9 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(1, 1, 0, 0); } - EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, - 0.0D, 0.0D, new ItemStack(Blocks.lava, 1, 1)); + EntityItem entityitem = new EntityItem( + te.getWorldObj(), 0.0D, 0.0D, 0.0D, + new ItemStack(Blocks.lava, 1, 1)); entityitem.hoverStart = 0.0F; GL11.glTranslatef(-0F, 1.25F, -0.345F); GL11.glScalef(1.2F, 1.0F, 1.7F); @@ -79,9 +81,11 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { int j = i % 65536; int k = i / 65536; OpenGlHelper.setLightmapTextureCoords( - OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); - RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, - 0.0D, 0.0D, 0.0F, 0.0F); + OpenGlHelper.lightmapTexUnit, + j / 1.0F, k / 1.0F); + RenderManager.instance.renderEntityWithPosYaw( + entityitem, 0.0D, 0.0D, 0.0D, 0.0F, + 0.0F); RenderItem.renderInFrame = false; if (JewelrycraftMod.fancyRender) GL11.glDisable(GL11.GL_BLEND); @@ -92,7 +96,8 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { if (st.hasMetal && st.metal != null && st.metal.getItem() != null) { GL11.glPushMatrix(); - EntityItem metal = new EntityItem(te.getWorldObj(), 0.0D, + EntityItem metal = new EntityItem( + te.getWorldObj(), 0.0D, 0.0D, 0.0D, st.metal); metal.getEntityItem().stackSize = 1; metal.hoverStart = 0.0F; @@ -102,33 +107,46 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer { GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glTranslatef(-0.9F, -0.9F, -1.6F); Minecraft.getMinecraft().gameSettings.fancyGraphics = true; - RenderManager.instance.renderEntityWithPosYaw(metal, 0.0D, - 0.0D, 0.0D, 0.0F, 0.0F); - Minecraft.getMinecraft().gameSettings.fancyGraphics = - fancyGraphics; + RenderManager.instance + .renderEntityWithPosYaw( + metal, + 0.0D, 0.0D, + 0.0D, 0.0F, + 0.0F); + Minecraft.getMinecraft().gameSettings.fancyGraphics = fancyGraphics; GL11.glPopMatrix(); } if (st.hasMoltenMetal && st.moltenMetal != null - && st.moltenMetal.getItem() != null) { + && st.moltenMetal + .getItem() != null) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); if (JewelrycraftMod.fancyRender) { GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(1, 1, 0, 0); + OpenGlHelper.glBlendFunc(1, 1, 0, + 0); } - ItemStack metal = new ItemStack(ItemList.metal); + ItemStack metal = new ItemStack( + ItemList.metal); ItemStack ingot = st.moltenMetal.copy(); JewelryNBT.addMetal(metal, ingot); - EntityItem moltenMetal = new EntityItem(te.getWorldObj(), - 0.0D, 0.0D, 0.0D, metal); + EntityItem moltenMetal = new EntityItem( + te.getWorldObj(), 0.0D, + 0.0D, 0.0D, metal); moltenMetal.getEntityItem().stackSize = 1; moltenMetal.hoverStart = 0.0F; - GL11.glTranslatef(-0F, 1.00f - .4F * st.quantity, -0.14F); + GL11.glTranslatef(-0F, + 1.00f - .4F * st.quantity, + -0.14F); GL11.glScalef(0.71F, 1F, 0.84F); GL11.glRotatef(90F, 1F, 0F, 0f); RenderItem.renderInFrame = true; - RenderManager.instance.renderEntityWithPosYaw(moltenMetal, - 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderManager.instance + .renderEntityWithPosYaw( + moltenMetal, + 0.0D, 0.0D, + 0.0D, 0.0F, + 0.0F); RenderItem.renderInFrame = false; if (JewelrycraftMod.fancyRender) GL11.glDisable(GL11.GL_BLEND); -- cgit v1.2.3