From 9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 16:03:42 -0400 Subject: Formatting pass --- .../jewelrycraft/block/BlockHandPedestal.java | 40 ++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java') diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java b/src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java index e4b8efc..2cfe437 100755 --- a/src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java +++ b/src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java @@ -51,8 +51,8 @@ public class BlockHandPedestal extends BlockContainer { * @return */ @Override - public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, - int j, int k, int l) { + public boolean shouldSideBeRendered(IBlockAccess iblockaccess, + int i, int j, int k, int l) { return false; } @@ -86,13 +86,14 @@ public class BlockHandPedestal extends BlockContainer { */ @Override public boolean onBlockActivated(World world, int i, int j, int k, - EntityPlayer entityPlayer, int par6, float par7, float par8, - float par9) { - TileEntityHandPedestal te = - (TileEntityHandPedestal) world.getTileEntity(i, j, k); + EntityPlayer entityPlayer, int par6, float par7, + float par8, float par9) { + TileEntityHandPedestal te = (TileEntityHandPedestal) world + .getTileEntity(i, j, k); ItemStack item = entityPlayer.inventory.getCurrentItem(); if (te != null) { - if (!world.isRemote && te.getHeldItemStack() == null + if (!world.isRemote + && te.getHeldItemStack() == null && item != null) { te.setHeldItemStack(item.copy()); if (!entityPlayer.capabilities.isCreativeMode) @@ -100,7 +101,8 @@ public class BlockHandPedestal extends BlockContainer { te.markDirty(); } else if (entityPlayer.isSneaking()) if (entityPlayer.inventory - .addItemStackToInventory(te.getHeldItemStack())) { + .addItemStackToInventory(te + .getHeldItemStack())) { te.removeHeldItemStack(); } te.markDirty(); @@ -117,8 +119,8 @@ public class BlockHandPedestal extends BlockContainer { */ public void dropItem(World world, double x, double y, double z, ItemStack stack) { - EntityItem entityitem = - new EntityItem(world, x + 0.5, y + 1.5, z + 0.5, stack); + EntityItem entityitem = new EntityItem(world, x + 0.5, + y + 1.5, z + 0.5, stack); entityitem.motionX = 0; entityitem.motionZ = 0; entityitem.motionY = 0.11000000298023224D; @@ -134,13 +136,13 @@ public class BlockHandPedestal extends BlockContainer { * @param par6 */ @Override - public void breakBlock(World world, int i, int j, int k, Block block, - int par6) { - TileEntityHandPedestal te = - (TileEntityHandPedestal) world.getTileEntity(i, j, k); + public void breakBlock(World world, int i, int j, int k, + Block block, int par6) { + TileEntityHandPedestal te = (TileEntityHandPedestal) world + .getTileEntity(i, j, k); if (te != null && te.getHeldItemStack() != null) { - dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, - te.getHeldItemStack()); + dropItem(te.getWorldObj(), te.xCoord, te.yCoord, + te.zCoord, te.getHeldItemStack()); world.removeTileEntity(i, j, k); } super.breakBlock(world, i, j, k, block, par6); @@ -156,9 +158,11 @@ public class BlockHandPedestal extends BlockContainer { */ @Override public void onBlockPlacedBy(World world, int i, int j, int k, - EntityLivingBase entityLiving, ItemStack par6ItemStack) { + EntityLivingBase entityLiving, + ItemStack par6ItemStack) { int rotation = MathHelper.floor_double( - entityLiving.rotationYaw * 8 / 360 + 0.5) & 7; + entityLiving.rotationYaw * 8 / 360 + 0.5) + & 7; world.setBlockMetadataWithNotify(i, j, k, rotation, 2); } -- cgit v1.2.3