@Override public void readFromNBT(NBTTagCompound compound) { this.nbt = compound; int version = compound.getInteger(TAG_VERSION); if (version < VERSION) { Log.warn("Outdated atlas data format! Was %d but current is %d. Updating.", version, VERSION); readFromNBT2(compound); return; } NBTTagList dimensionMapList = compound.getTagList(TAG_DIMENSION_MAP_LIST, Constants.NBT.TAG_COMPOUND); for (int d = 0; d < dimensionMapList.tagCount(); d++) { NBTTagCompound dimTag = dimensionMapList.getCompoundTagAt(d); int dimensionID = dimTag.getInteger(TAG_DIMENSION_ID); NBTTagList dimensionTag = (NBTTagList) dimTag.getTag(TAG_VISITED_CHUNKS); DimensionData dimData = getDimensionData(dimensionID); dimData.readFromNBT(dimensionTag); double zoom = (double)dimTag.getInteger(TAG_BROWSING_ZOOM) / BrowsingPositionPacket.ZOOM_SCALE_FACTOR; if (zoom == 0) zoom = 0.5; dimData.setBrowsingPosition(dimTag.getInteger(TAG_BROWSING_X), dimTag.getInteger(TAG_BROWSING_Y), zoom); } }