summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 16:03:42 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 16:03:42 -0400
commit9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa (patch)
treeb4307f58fe2197d2215707bb3f44cf8952229c6d /src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java
parent4f7ad220df0438b6f3382110577b53f29da46453 (diff)
Formatting pass
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java')
-rwxr-xr-xsrc/main/java/darkknight/jewelrycraft/block/BlockHandPedestal.java40
1 files changed, 22 insertions, 18 deletions
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);
}