diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 8bb50c7e..815f0fde 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -130,19 +130,21 @@ public class ItemFacade extends ItemBuildCraft { || b.getRenderType() != 0) { continue; } - } - - Item base = Item.getItemFromBlock(b); + } - if (base != null) { - List stackList = new ArrayList (); - if ( FMLCommonHandler.instance().getSide() == Side.CLIENT ) { - base.getSubItems(base, null, stackList); - } + ItemStack base = new ItemStack(b, 1); + + if (base.getHasSubtypes()) { + Set names = Sets.newHashSet(); - for (ItemStack s : stackList) { - ItemFacade.addFacade(s); - } + for (int meta = 0; meta <= 15; meta++) { + ItemStack is = new ItemStack(b, 1, meta); + if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) && names.add(is.getUnlocalizedName())) { + ItemFacade.addFacade(is); + } + } + } else { + ItemFacade.addFacade(base); } } } diff --git a/common/buildcraft/transport/gates/GateDefinition.java b/common/buildcraft/transport/gates/GateDefinition.java index 8898d3ad..18535e20 100644 --- a/common/buildcraft/transport/gates/GateDefinition.java +++ b/common/buildcraft/transport/gates/GateDefinition.java @@ -10,7 +10,11 @@ package buildcraft.transport.gates; import buildcraft.core.DefaultProps; import buildcraft.core.utils.StringUtils; + import java.util.Locale; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation;