Merge pull request #1433 from fabricator77/BuildCraft-5.0.x
Fix IIcon sided crashes on dedicated server
This commit is contained in:
commit
8a30d95286
2 changed files with 9 additions and 1 deletions
|
@ -136,7 +136,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);
|
||||
|
|
|
@ -34,13 +34,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;
|
||||
}
|
||||
|
@ -49,11 +53,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