fix SMP facade crash
This commit is contained in:
parent
7d9892bc13
commit
4257b6d70c
1 changed files with 9 additions and 3 deletions
|
@ -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<ItemStack> stacks = new ArrayList<ItemStack>(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 {
|
||||
|
|
Loading…
Reference in a new issue