use of net.tslat.aoa3.library.misc.PortalCoordinatesContainer in project Advent-Of-Ascension by Tslat.
the class PlayerDataManager method saveToNBT.
public NBTTagCompound saveToNBT() {
NBTTagCompound baseTag = new NBTTagCompound();
stats.saveToNBT(baseTag);
if (!portalCoordinatesMap.isEmpty()) {
NBTTagCompound portalCoordinatesNBT = new NBTTagCompound();
for (Map.Entry<Integer, PortalCoordinatesContainer> entry : portalCoordinatesMap.entrySet()) {
NBTTagCompound portalReturnTag = new NBTTagCompound();
PortalCoordinatesContainer container = entry.getValue();
portalReturnTag.setInteger("FromDim", container.fromDim);
portalReturnTag.setDouble("PosX", container.x);
portalReturnTag.setDouble("PosY", container.y);
portalReturnTag.setDouble("PosZ", container.z);
portalCoordinatesNBT.setTag(entry.getKey().toString(), portalReturnTag);
}
baseTag.setTag("PortalMap", portalCoordinatesNBT);
}
return baseTag;
}
Aggregations