MCPcopy Create free account
hub / github.com/Card-Forge/forge / load

Method load

forge-gui-mobile/src/forge/adventure/world/World.java:99–119  ·  view source on GitHub ↗
(SaveFileData saveFileData)

Source from the content-addressed store, hash-verified

97 }
98
99 @Override
100 public void load(SaveFileData saveFileData) {
101
102 if (biomeImage != null)
103 biomeImage.dispose();
104
105 loadWorldData();
106
107 biomeImage = saveFileData.readPixmap("biomeImage");
108 biomeMap = (long[][]) saveFileData.readObject("biomeMap");
109 terrainMap = (int[][]) saveFileData.readObject("terrainMap");
110
111
112 width = saveFileData.readInt("width");
113 height = saveFileData.readInt("height");
114 mapObjectIds = new SpritesDataMap(getChunkSize(), this.data.tileSize, this.data.width / getChunkSize());
115 mapObjectIds.load(saveFileData.readSubData("mapObjectIds"));
116 mapPoiIds = new PointOfInterestMap(getChunkSize(), this.data.tileSize, this.data.width / getChunkSize(), this.data.height / getChunkSize());
117 mapPoiIds.load(saveFileData.readSubData("mapPoiIds"));
118 seed = saveFileData.readLong("seed");
119 }
120
121 @Override
122 public SaveFileData save() {

Callers

nothing calls this directly

Calls 9

loadWorldDataMethod · 0.95
getChunkSizeMethod · 0.95
readPixmapMethod · 0.80
readIntMethod · 0.80
readSubDataMethod · 0.80
readLongMethod · 0.80
disposeMethod · 0.65
loadMethod · 0.65
readObjectMethod · 0.45

Tested by

no test coverage detected