use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.
the class CommonInterop method chunkLoaded.
public static void chunkLoaded(Chunk chunk) {
DimensionId dimensionId = DimensionId.from(chunk.getWorld().getDimension().getType());
Map<String, StructureStart> structures = chunk.getStructureStarts();
if (structures.size() > 0)
EventBus.publish(new StructuresLoaded(structures, dimensionId));
}
use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.
the class AddBoundingBox method getEvent.
public static AddBoundingBoxReceived getEvent(PayloadReader reader, String name) {
DimensionId dimensionId = getDimensionId(reader, name);
AbstractBoundingBox key = BoundingBoxDeserializer.deserialize(reader);
if (key == null)
return null;
Set<AbstractBoundingBox> boundingBoxes = new HashSet<>();
while (reader.isReadable()) {
AbstractBoundingBox boundingBox = BoundingBoxDeserializer.deserialize(reader);
boundingBoxes.add(boundingBox);
}
if (boundingBoxes.size() == 0)
boundingBoxes.add(key);
return new AddBoundingBoxReceived(dimensionId, key, boundingBoxes);
}
use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.
the class CustomBeaconProvider method add.
public static void add(Coords coords, int level) {
DimensionId dimensionId = Player.getDimensionId();
BoundingBoxBeacon beacon = BoundingBoxBeacon.from(coords, level, BoundingBoxType.Custom);
getCache(dimensionId).put(coords, beacon);
}
Aggregations