public void update() { super.update(); if (!worldObj.isRemote) { checkForChanges(); checkInventory(); if (isBurning()) { useCobbleGen(); if (!isDone()) { // mine! mine(); } } } }
public void readCommonNBT(NBTTagCompound nbt) { super.readCommonNBT(nbt); if (nbt.hasKey("MineBlocks")) totalMineBlocks = nbt.getInteger("MineBlocks"); if (nbt.hasKey("MinedBlocks")) currentMineBlocks = nbt.getInteger("MinedBlocks"); }
public void writeCommonNBT(NBTTagCompound nbt) { super.writeCommonNBT(nbt); nbt.setInteger("MineBlocks", totalMineBlocks); nbt.setInteger("MinedBlocks", currentMineBlocks); }