use of com.irtimaled.bbor.common.events.StructuresLoaded in project BoundingBoxOutlineReloaded by irtimaled.
the class NBTStructureLoader method loadStructures.
void loadStructures(int chunkX, int chunkZ) {
if (saveHandler == null)
return;
if (!loadedChunks.add(String.format("%s,%s", chunkX, chunkZ)))
return;
CompoundNBT structureStarts = loadStructureStarts(chunkX, chunkZ);
if (structureStarts == null || structureStarts.size() == 0)
return;
Map<String, StructureStart> structureStartMap = new HashMap<>();
for (String key : structureStarts.keySet()) {
CompoundNBT compound = structureStarts.getCompound(key);
if (compound.contains("BB")) {
structureStartMap.put(key, new SimpleStructureStart(compound));
}
}
EventBus.publish(new StructuresLoaded(structureStartMap, dimensionId));
}
Aggregations