public void readFromNBT(NBTTagCompound nbt) { NBTTagList list = nbt.getTagList("GatheringLocations", 10); for (int i = 0; i < list.tagCount(); i++) { NBTTagCompound tag = list.getCompoundTagAt(i); GatheringLocation location = new GatheringLocation(); location.readFromNBT(tag); locations.add(location); } }