Example #1
0
  public void update() {
    super.update();
    if (!worldObj.isRemote) {
      checkForChanges();
      checkInventory();

      if (isBurning()) {
        useCobbleGen();
        if (!isDone()) {
          // mine!
          mine();
        }
      }
    }
  }
Example #2
0
 public void readCommonNBT(NBTTagCompound nbt) {
   super.readCommonNBT(nbt);
   if (nbt.hasKey("MineBlocks")) totalMineBlocks = nbt.getInteger("MineBlocks");
   if (nbt.hasKey("MinedBlocks")) currentMineBlocks = nbt.getInteger("MinedBlocks");
 }
Example #3
0
 public void writeCommonNBT(NBTTagCompound nbt) {
   super.writeCommonNBT(nbt);
   nbt.setInteger("MineBlocks", totalMineBlocks);
   nbt.setInteger("MinedBlocks", currentMineBlocks);
 }