From 4257b6d70c9381c05562e249f2b080cf1d1deed8 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Thu, 22 Jan 2015 14:31:50 +0100 Subject: [PATCH] fix SMP facade crash --- common/buildcraft/transport/ItemFacade.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 12081c44..208cbf7e 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -27,6 +27,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.world.World; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -242,10 +243,15 @@ public class ItemFacade extends ItemBuildCraft implements IFacadeItem, IPipePlug } private void registerValidFacades(Block block, Item item) { - //for (int i = 0; i < 16; i++) { ArrayList stacks = new ArrayList(16); - for (CreativeTabs tab : item.getCreativeTabs()) { - block.getSubBlocks(item, tab, stacks); + if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { + for (CreativeTabs ct : item.getCreativeTabs()) { + block.getSubBlocks(item, ct, stacks); + } + } else { + for (int i = 0; i < 16; i++) { + stacks.add(new ItemStack(item, 1, i)); + } } for (ItemStack stack : stacks) { try {