Fixed Bug: #0611 - Can place crafting CPU multiblock blocks inside of yourself
This commit is contained in:
parent
98e4604690
commit
c06e7d09d9
1 changed files with 8 additions and 6 deletions
|
@ -41,15 +41,16 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
|
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 );
|
TileCraftingTile tg = getTileEntity( w, x, y, z );
|
||||||
if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
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 );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,8 +60,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||||
int meta = w.getBlockMetadata( x, y, z );
|
int meta = w.getBlockMetadata( x, y, z );
|
||||||
return damageDropped( meta );
|
return damageDropped( meta );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped( int meta )
|
public int damageDropped(int meta)
|
||||||
{
|
{
|
||||||
return meta & 3;
|
return meta & 3;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +86,7 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||||
{
|
{
|
||||||
IIcon front = getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage );
|
IIcon front = getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage );
|
||||||
IIcon other = getIcon( ForgeDirection.NORTH.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
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue