Facades and FMP parts can no longer overlap.

This commit is contained in:
AlgorithmX2
2014-04-19 23:35:48 -05:00
parent 2e71a6530e
commit fa307b467e
3 changed files with 50 additions and 9 deletions
+11 -8
View File
@@ -148,19 +148,22 @@ public class PartPlacement
if ( host.getPart( ForgeDirection.UNKNOWN ) == null )
return false;
if ( host.getFacadeContainer().addFacade( fp ) )
if ( host.canAddPart( held, side ) )
{
host.markForUpdate();
if ( !player.capabilities.isCreativeMode )
if ( host.getFacadeContainer().addFacade( fp ) )
{
held.stackSize--;
if ( held.stackSize == 0 )
host.markForUpdate();
if ( !player.capabilities.isCreativeMode )
{
player.inventory.mainInventory[player.inventory.currentItem] = null;
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held ) );
held.stackSize--;
if ( held.stackSize == 0 )
{
player.inventory.mainInventory[player.inventory.currentItem] = null;
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held ) );
}
}
return true;
}
return true;
}
}
else