]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/common/BoundingBoxType.java
1.18.2-rc1
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / common / BoundingBoxType.java
index 38850f8c4f35e9f1affe9358f6a90511588e27d0..c273d74f8ed2e7dc924866070ebd37dab4ad53c3 100644 (file)
@@ -1,10 +1,13 @@
 package com.irtimaled.bbor.common;
 
+import it.unimi.dsi.fastutil.objects.Object2ObjectMaps;
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
+
 import java.util.HashMap;
 import java.util.Map;
 
 public class BoundingBoxType {
-    private static final Map<Integer, BoundingBoxType> structureTypeMap = new HashMap<>();
+    private static final Map<Integer, BoundingBoxType> structureTypeMap = Object2ObjectMaps.synchronize(new Object2ObjectOpenHashMap<>());
 
     public static final BoundingBoxType WorldSpawn = register("World_Spawn");
     public static final BoundingBoxType SpawnChunks = register("Spawn_Chunks");
@@ -20,26 +23,9 @@ public class BoundingBoxType {
     public static final BoundingBoxType FlowerForest = register("Flower Forest");
     public static final BoundingBoxType BedrockCeiling = register("Bedrock Ceiling");
 
-    public static final BoundingBoxType JungleTemple = register("jungle_pyramid");
-    public static final BoundingBoxType DesertTemple = register("desert_pyramid");
-    public static final BoundingBoxType WitchHut = register("swamp_hut");
-    public static final BoundingBoxType OceanMonument = register("monument");
-    public static final BoundingBoxType Shipwreck = register("shipwreck");
-    public static final BoundingBoxType OceanRuin = register("ocean_ruin");
-    public static final BoundingBoxType BuriedTreasure = register("buried_treasure");
-    public static final BoundingBoxType Stronghold = register("stronghold");
-    public static final BoundingBoxType MineShaft = register("mineshaft");
-    public static final BoundingBoxType NetherFortress = register("fortress");
-    public static final BoundingBoxType EndCity = register("endcity");
-    public static final BoundingBoxType Mansion = register("mansion");
-    public static final BoundingBoxType Igloo = register("igloo");
-    public static final BoundingBoxType PillagerOutpost = register("pillager_outpost");
-    public static final BoundingBoxType Village = register("village");
-    public static final BoundingBoxType NetherFossil = register("nether_fossil");
-    public static final BoundingBoxType BastionRemnant = register("bastion_remnant");
-    public static final BoundingBoxType RuinedPortal = register("ruined_portal");
+    public static final Map<String, BoundingBoxType> structures = new HashMap<>();
 
-    private static BoundingBoxType register(String name) {
+    public static BoundingBoxType register(String name) {
         return structureTypeMap.computeIfAbsent(name.hashCode(), k -> new BoundingBoxType(name));
     }