]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/commitdiff
Fix server-only issues
authorIrtimaled <irtimaled@gmail.com>
Mon, 18 May 2020 20:34:25 +0000 (13:34 -0700)
committerIrtimaled <irtimaled@gmail.com>
Mon, 18 May 2020 20:35:23 +0000 (13:35 -0700)
gradle.properties
src/main/java/com/irtimaled/bbor/common/BoundingBoxType.java
src/main/java/com/irtimaled/bbor/common/CommonProxy.java

index d99738ab2f35b9ccaa81b6f208e6a000836e1258..d4424ecf7d212bbe2d6f0a5ed66a1d0cc8a9bcd7 100644 (file)
@@ -1,4 +1,4 @@
 name=bbor
-buildVersion=2.0
+buildVersion=2.0b
 # leave a space to reduce merge conflicts on version change
 mcVersion=1.13.2
index ea3902cf3ad2caff8355414b79682faa710358d6..22a2ae37e8c6ca6bb1ed55e49202f49e72fa8b60 100644 (file)
@@ -39,9 +39,11 @@ public class BoundingBoxType {
     public static final BoundingBoxType RuinedPortal = register("Ruined_Portal");
 
     private static BoundingBoxType register(String name) {
-        BoundingBoxType type = structureTypeMap.computeIfAbsent(name.hashCode(), k -> new BoundingBoxType(name));
-        StructureProcessor.registerSupportedStructure(type);
-        return type;
+        return structureTypeMap.computeIfAbsent(name.hashCode(), k -> new BoundingBoxType(name));
+    }
+
+    public static void registerTypes() {
+        structureTypeMap.values().forEach(StructureProcessor::registerSupportedStructure);
     }
 
     public static BoundingBoxType getByNameHash(Integer nameHash) {
index 6885fced2b85d3527fd4d80406a39ce05aa11f74..c9add51fcc50bd192fea446d7be75974e15c8c1b 100644 (file)
@@ -26,6 +26,7 @@ public class CommonProxy {
     private Integer spawnZ = null;
 
     public void init() {
+        BoundingBoxType.registerTypes();
         EventBus.subscribe(WorldLoaded.class, this::worldLoaded);
         EventBus.subscribe(StructuresLoaded.class, this::structuresLoaded);
         EventBus.subscribe(PlayerLoggedIn.class, this::playerLoggedIn);