From f15bc9e0abff4710d9860bd970b3b6820c5e78c6 Mon Sep 17 00:00:00 2001 From: bspkrs Date: Mon, 16 Dec 2013 14:19:04 -0500 Subject: tested creation of rings with custom NBT - working! reformatted source --- common/darkknight/jewelrycraft/block/BlockSmelter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/darkknight/jewelrycraft/block/BlockSmelter.java') diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java index c9cf575..d78e85a 100644 --- a/common/darkknight/jewelrycraft/block/BlockSmelter.java +++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java @@ -41,7 +41,7 @@ public class BlockSmelter extends BlockContainer @Override public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int par5) - { + { TileEntitySmelter te = (TileEntitySmelter) world.getBlockTileEntity(i, j, k); if (te != null) { @@ -74,7 +74,7 @@ public class BlockSmelter extends BlockContainer @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) - { + { TileEntitySmelter te = (TileEntitySmelter) world.getBlockTileEntity(i, j, k); ItemStack item = entityPlayer.inventory.getCurrentItem(); if (te != null && !world.isRemote) @@ -105,7 +105,7 @@ public class BlockSmelter extends BlockContainer @Override public void onBlockClicked(World world, int i, int j, int k, EntityPlayer player) - { + { TileEntitySmelter te = (TileEntitySmelter) world.getBlockTileEntity(i, j, k); TileEntityMolder me = null; if (world.getBlockMetadata(i, j, k) == 0) @@ -155,7 +155,7 @@ public class BlockSmelter extends BlockContainer @Override public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityLiving, ItemStack par6ItemStack) - { + { int rotation = MathHelper.floor_double(entityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; world.setBlockMetadataWithNotify(i, j, k, rotation, 2); } -- cgit v1.2.3