Fix IIcon sided crashes on dedicated server

This commit is contained in:
fabricator77 2014-02-15 14:09:48 +10:30
parent b3dac23866
commit d2a4dabdc7
2 changed files with 9 additions and 1 deletions

View file

@ -128,7 +128,9 @@ public class ItemFacade extends ItemBuildCraft {
if (base != null) {
List <ItemStack> stackList = new ArrayList<ItemStack> ();
base.getSubItems(base, null, stackList);
if ( FMLCommonHandler.instance().getSide() == Side.CLIENT ) {
base.getSubItems(base, null, stackList);
}
for (ItemStack s : stackList) {
ItemFacade.addFacade(s);

View file

@ -38,13 +38,17 @@ public final class GateDefinition {
public final int guiHeight;
public final int numSlots;
public final boolean hasParameterSlot;
@SideOnly(Side.CLIENT)
private IIcon iconBlock;
@SideOnly(Side.CLIENT)
private IIcon iconItem;
@SideOnly(Side.CLIENT)
public IIcon getIconBlock() {
return iconBlock;
}
@SideOnly(Side.CLIENT)
public IIcon getIconItem() {
return iconItem;
}
@ -53,11 +57,13 @@ public final class GateDefinition {
return name().toLowerCase(Locale.ENGLISH);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcon(IIconRegister iconRegister) {
if (this != REDSTONE)
iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());
}
@SideOnly(Side.CLIENT)
public void registerItemIcon(IIconRegister iconRegister) {
if (this != REDSTONE)
iconItem = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());