I tried to fix item rendering issues, but failed.

This commit is contained in:
modmuss50 2017-10-09 13:36:39 +01:00 committed by drcrazy
parent e0edff6891
commit c0fc388a01
2 changed files with 6 additions and 1 deletions

View file

@ -128,13 +128,13 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
if(tag.hasKey("panelType")){
panel = EnumPanelType.values()[tag.getInteger("panelType")];
} else {
Core.logHelper.warn("A solar panel has failed to load from NBT, it will not work correctly. Please break and replace it to fix the issue. BlockPos:" + pos.toString());
panel = EnumPanelType.Basic;
}
super.readFromNBT(tag);
}
@Override