use of mcjty.rftoolsdim.dimensions.description.DimensionDescriptor in project RFToolsDimensions by McJty.
the class RfToolsDimensionManager method readFromNBT.
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
dimensions.clear();
dimensionToID.clear();
dimensionInformation.clear();
reclaimedIds.clear();
NBTTagList lst = tagCompound.getTagList("dimensions", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < lst.tagCount(); i++) {
NBTTagCompound tc = lst.getCompoundTagAt(i);
int id = tc.getInteger("id");
DimensionDescriptor descriptor = new DimensionDescriptor(tc);
dimensions.put(id, descriptor);
dimensionToID.put(descriptor, id);
DimensionInformation dimensionInfo = new DimensionInformation(descriptor, tc);
dimensionInformation.put(id, dimensionInfo);
}
int[] lstIds = tagCompound.getIntArray("reclaimedIds");
for (int id : lstIds) {
reclaimedIds.add(id);
}
}
Aggregations