From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../tileentity/TileEntityHandPedestal.java | 53 +++++++++++++--------- 1 file changed, 31 insertions(+), 22 deletions(-) mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java (limited to 'src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java') diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java old mode 100644 new mode 100755 index e4a8602..c44cd88 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityHandPedestal.java @@ -24,8 +24,8 @@ public class TileEntityHandPedestal extends TileEntity { private boolean isHandOpen; /** - * - */ + * + */ public TileEntityHandPedestal() { isDirty = false; heldItemStack = null; @@ -55,14 +55,17 @@ public class TileEntityHandPedestal extends TileEntity { @Override public void readFromNBT(NBTTagCompound tagCompound) { super.readFromNBT(tagCompound); - if (tagCompound.hasKey("object", 10)) setHeldItemStack(ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("object"))); - else removeHeldItemStack(); + if (tagCompound.hasKey("object", 10)) + setHeldItemStack(ItemStack.loadItemStackFromNBT( + tagCompound.getCompoundTag("object"))); + else + removeHeldItemStack(); isHandOpen = tagCompound.getBoolean("isHandOpen"); } /** - * - */ + * + */ @Override public void updateEntity() { super.updateEntity(); @@ -74,12 +77,14 @@ public class TileEntityHandPedestal extends TileEntity { } /** - * - */ + * + */ private void updateGrip() { prevGrip = grip; - if (grip > 0 && isHandOpen) grip -= 1 / gripScale; - else if (grip < gripMax && !isHandOpen) grip += 1 / gripScale; + if (grip > 0 && isHandOpen) + grip -= 1 / gripScale; + else if (grip < gripMax && !isHandOpen) + grip += 1 / gripScale; } /** @@ -89,7 +94,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); } /** @@ -97,14 +103,15 @@ public class TileEntityHandPedestal extends TileEntity { * @param packet */ @Override - public void onDataPacket(NetworkManager networkManager, S35PacketUpdateTileEntity packet) { + public void onDataPacket(NetworkManager networkManager, + S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); worldObj.func_147479_m(xCoord, yCoord, zCoord); } /** - * - */ + * + */ @Override public void markDirty() { super.markDirty(); @@ -125,28 +132,30 @@ public class TileEntityHandPedestal extends TileEntity { if (heldItemStack != null && heldItemStack.getItem() != null) { heldItemStack.stackSize = 1; this.heldItemStack = heldItemStack; - if (heldItemStack.getItem() instanceof ItemBlock) gripScale = 0.5f; - else gripScale = 1; + if (heldItemStack.getItem() instanceof ItemBlock) + gripScale = 0.5f; + else + gripScale = 1; } } /** - * - */ + * + */ public void removeHeldItemStack() { heldItemStack = null; } /** - * - */ + * + */ public void openHand() { isHandOpen = true; } /** - * - */ + * + */ public void closeHand() { isHandOpen = false; } -- cgit v1.2.3