Search in sources :

Example 1 with DimensionId

use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.

the class CustomBoxProvider method remove.

public static boolean remove(Coords minCoords, Coords maxCoords) {
    DimensionId dimensionId = Player.getDimensionId();
    int cacheKey = getHashKey(minCoords, maxCoords);
    return getCache(dimensionId).remove(cacheKey) != null;
}
Also used : DimensionId(com.irtimaled.bbor.common.models.DimensionId)

Example 2 with DimensionId

use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.

the class CustomBoxProvider method add.

public static void add(Coords minCoords, Coords maxCoords) {
    DimensionId dimensionId = Player.getDimensionId();
    int cacheKey = getHashKey(minCoords, maxCoords);
    BoundingBoxCuboid cuboid = BoundingBoxCuboid.from(minCoords, maxCoords, BoundingBoxType.Custom);
    getCache(dimensionId).put(cacheKey, cuboid);
}
Also used : BoundingBoxCuboid(com.irtimaled.bbor.common.models.BoundingBoxCuboid) DimensionId(com.irtimaled.bbor.common.models.DimensionId)

Example 3 with DimensionId

use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.

the class CustomLineProvider method remove.

public static boolean remove(Point min, Point max) {
    DimensionId dimensionId = Player.getDimensionId();
    int cacheKey = getHashKey(min, max);
    return getCache(dimensionId).remove(cacheKey) != null;
}
Also used : DimensionId(com.irtimaled.bbor.common.models.DimensionId) Point(com.irtimaled.bbor.client.models.Point)

Example 4 with DimensionId

use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.

the class CustomLineProvider method add.

public static void add(Point minPoint, Point maxPoint, Double width) {
    DimensionId dimensionId = Player.getDimensionId();
    int cacheKey = getHashKey(minPoint, maxPoint);
    BoundingBoxLine line = BoundingBoxLine.from(minPoint, maxPoint, width, BoundingBoxType.Custom);
    getCache(dimensionId).put(cacheKey, line);
}
Also used : BoundingBoxLine(com.irtimaled.bbor.client.models.BoundingBoxLine) DimensionId(com.irtimaled.bbor.common.models.DimensionId) Point(com.irtimaled.bbor.client.models.Point)

Example 5 with DimensionId

use of com.irtimaled.bbor.common.models.DimensionId in project BoundingBoxOutlineReloaded by irtimaled.

the class SaveGameStructureLoader method loadSaveGame.

static void loadSaveGame(String fileName) {
    Minecraft minecraft = Minecraft.getInstance();
    SaveFormat saveLoader = minecraft.getSaveLoader();
    saveHandler = saveLoader.getSaveLoader(fileName, null);
    worldDirectory = saveLoader.func_215781_c().resolve(fileName).toFile();
    for (DimensionId dimensionId : nbtStructureLoaders.keySet()) {
        NBTStructureLoader dimensionProcessor = getNBTStructureLoader(dimensionId);
        dimensionProcessor.configure(saveHandler, worldDirectory);
    }
    loadChunksAroundPlayer();
}
Also used : SaveFormat(net.minecraft.world.storage.SaveFormat) Minecraft(net.minecraft.client.Minecraft) DimensionId(com.irtimaled.bbor.common.models.DimensionId)

Aggregations

DimensionId (com.irtimaled.bbor.common.models.DimensionId)13 Point (com.irtimaled.bbor.client.models.Point)4 AbstractBoundingBox (com.irtimaled.bbor.common.models.AbstractBoundingBox)2 HashSet (java.util.HashSet)2 AddBoundingBoxReceived (com.irtimaled.bbor.client.events.AddBoundingBoxReceived)1 BoundingBoxBeacon (com.irtimaled.bbor.client.models.BoundingBoxBeacon)1 BoundingBoxLine (com.irtimaled.bbor.client.models.BoundingBoxLine)1 BoundingBoxSphere (com.irtimaled.bbor.client.models.BoundingBoxSphere)1 PayloadBuilder (com.irtimaled.bbor.common.messages.PayloadBuilder)1 BoundingBoxCuboid (com.irtimaled.bbor.common.models.BoundingBoxCuboid)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Set (java.util.Set)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Minecraft (net.minecraft.client.Minecraft)1 StructureStart (net.minecraft.world.gen.feature.structure.StructureStart)1 SaveFormat (net.minecraft.world.storage.SaveFormat)1