Fix IIcon sided crashes on dedicated server
This commit is contained in:
parent
b3dac23866
commit
d2a4dabdc7
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue