From c06e7d09d9c96f64c0cfffe94651740b4454e959 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sat, 12 Jul 2014 18:59:15 -0500 Subject: [PATCH] Fixed Bug: #0611 - Can place crafting CPU multiblock blocks inside of yourself --- block/crafting/BlockCraftingUnit.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block/crafting/BlockCraftingUnit.java b/block/crafting/BlockCraftingUnit.java index cf7001fa1..cf8d70441 100644 --- a/block/crafting/BlockCraftingUnit.java +++ b/block/crafting/BlockCraftingUnit.java @@ -41,15 +41,16 @@ public class BlockCraftingUnit extends AEBaseBlock @Override public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) { - if ( Platform.isClient() ) - return true; - TileCraftingTile tg = getTileEntity( w, x, y, z ); if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() ) { + if ( Platform.isClient() ) + return true; + Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU ); return true; } + return false; } @@ -59,12 +60,13 @@ public class BlockCraftingUnit extends AEBaseBlock int meta = w.getBlockMetadata( x, y, z ); return damageDropped( meta ); } + @Override - public int damageDropped( int meta ) + public int damageDropped(int meta) { return meta & 3; } - + @Override public String getUnlocalizedName(ItemStack is) { @@ -84,7 +86,7 @@ public class BlockCraftingUnit extends AEBaseBlock { IIcon front = getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage ); IIcon other = getIcon( ForgeDirection.NORTH.ordinal(), itemDamage ); - getRendererInstance().setTemporaryRenderIcons(other, other, front, other, other, other); + getRendererInstance().setTemporaryRenderIcons( other, other, front, other, other, other ); } @Override