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) {
|
if (base != null) {
|
||||||
List <ItemStack> stackList = new ArrayList<ItemStack> ();
|
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) {
|
for (ItemStack s : stackList) {
|
||||||
ItemFacade.addFacade(s);
|
ItemFacade.addFacade(s);
|
||||||
|
|
|
@ -38,13 +38,17 @@ public final class GateDefinition {
|
||||||
public final int guiHeight;
|
public final int guiHeight;
|
||||||
public final int numSlots;
|
public final int numSlots;
|
||||||
public final boolean hasParameterSlot;
|
public final boolean hasParameterSlot;
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBlock;
|
private IIcon iconBlock;
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconItem;
|
private IIcon iconItem;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIconBlock() {
|
public IIcon getIconBlock() {
|
||||||
return iconBlock;
|
return iconBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIconItem() {
|
public IIcon getIconItem() {
|
||||||
return iconItem;
|
return iconItem;
|
||||||
}
|
}
|
||||||
|
@ -53,11 +57,13 @@ public final class GateDefinition {
|
||||||
return name().toLowerCase(Locale.ENGLISH);
|
return name().toLowerCase(Locale.ENGLISH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcon(IIconRegister iconRegister) {
|
public void registerBlockIcon(IIconRegister iconRegister) {
|
||||||
if (this != REDSTONE)
|
if (this != REDSTONE)
|
||||||
iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());
|
iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerItemIcon(IIconRegister iconRegister) {
|
public void registerItemIcon(IIconRegister iconRegister) {
|
||||||
if (this != REDSTONE)
|
if (this != REDSTONE)
|
||||||
iconItem = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());
|
iconItem = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag());
|
||||||
|
|
Loading…
Add table
Reference in a new issue