So, I try to get 'TIME' from NBT, but I don't know why it didn't working. So, writeToNBT in my Tile Entity class looks like that:
@Override
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
super.writeToNBT(compound);
compound.setInteger("time", this.time);
compound.setInteger("maxTime", METAL_REFINERY_WORKTIME);
compound.setTag("items", this.itemStackHandler.serializeNBT());
return compound;
}
And my GUI Screen Updater looks like that:
@Override
public void updateScreen() {
NBTTagCompound compound = new NBTTagCompound();
compound = this.te.writeToNBT(compound);
this.time = compound.getInteger("time");
this.maxTime = compound.getInteger("maxTime");
Core.logger.info(compound);
super.updateScreen();
}
What's wrong?
Full code:
Block: *CLICK*
Tile Entity: *CLICK*
Container: *CLICK*
GUI: *CLICK*