private void finishDigging() { digging = false; digReady = false; coords.clear(); found.clear(); finishedDigging = true; // ReikaJavaLibrary.pConsole(found); this.syncAllData(true); this.scheduleBlockUpdate(5); // ChunkManager.instance.unloadChunks(this); }
@Override protected void readSyncTag(NBTTagCompound NBT) { super.readSyncTag(NBT); digging = NBT.getBoolean("dig"); digReady = NBT.getBoolean("dig2"); finishedDigging = NBT.getBoolean("finish"); index = NBT.getInteger("index"); dropFlag = NBT.getBoolean("dropped"); found.clear(); NBTTagList li = NBT.getTagList("count", NBTTypes.COMPOUND.ID); for (Object o : li.tagList) { NBTTagCompound tag = (NBTTagCompound) o; int id = tag.getInteger("id"); int meta = tag.getInteger("meta"); int count = tag.getInteger("count"); ItemStack is = new ItemStack(Item.getItemById(id), 1, meta); found.put(is, count); } }