diff --git a/pom.xml b/pom.xml index aa1a751..ecb9bda 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.TBMCPlugins CustomDimensions - 1.0 + 1.1 @@ -31,7 +31,7 @@ org.spigotmc spigot - 1.16.2-R0.1-SNAPSHOT + 1.16.3-R0.1-SNAPSHOT provided diff --git a/src/main/java/buttondevteam/customdimensions/CustomDimensions.java b/src/main/java/buttondevteam/customdimensions/CustomDimensions.java index a2d989c..418493b 100644 --- a/src/main/java/buttondevteam/customdimensions/CustomDimensions.java +++ b/src/main/java/buttondevteam/customdimensions/CustomDimensions.java @@ -28,7 +28,7 @@ public class CustomDimensions extends JavaPlugin implements Listener { getLogger().info("Finished loading custom dimensions!"); } - public void load() throws Exception { + private void load() throws Exception { var console = ((CraftServer) Bukkit.getServer()).getServer(); var field = console.getClass().getSuperclass().getDeclaredField("saveData"); field.setAccessible(true); @@ -63,14 +63,14 @@ public class CustomDimensions extends JavaPlugin implements Listener { MinecraftServer.convertWorld(session); //Load world settings or create default values - RegistryReadOps registryreadops = RegistryReadOps.a(DynamicOpsNBT.a, console.dataPackResources.h(), console.f); + RegistryReadOps registryreadops = RegistryReadOps.a(DynamicOpsNBT.a, console.dataPackResources.h(), console.customRegistry); WorldDataServer worlddata = (WorldDataServer) session.a(registryreadops, console.datapackconfiguration); if (worlddata == null) { Properties properties = new Properties(); properties.put("level-seed", Objects.toString(mainWorld.getSeed())); properties.put("generate-structures", Objects.toString(true)); properties.put("level-type", WorldType.NORMAL.getName()); - GeneratorSettings dimGenSettings = GeneratorSettings.a(console.aX(), properties); + GeneratorSettings dimGenSettings = GeneratorSettings.a(console.getCustomRegistry(), properties); WorldSettings worldSettings = new WorldSettings(name, EnumGamemode.getById(Bukkit.getDefaultGameMode().getValue()), false, //Hardcore @@ -92,7 +92,7 @@ public class CustomDimensions extends JavaPlugin implements Listener { ResourceKey dimManResKey = ResourceKey.a(IRegistry.K, dimKey.a()); //Replace existing dimension manager, correctly setting the ID up (which is -1 for default worlds...) - ((RegistryMaterials) console.f.a()).a(OptionalInt.empty(), dimManResKey, dimensionmanager, Lifecycle.stable()); + ((RegistryMaterials) console.customRegistry.a()).a(OptionalInt.empty(), dimManResKey, dimensionmanager, Lifecycle.stable()); var worldloadlistener = console.worldLoadListenerFactory.create(11); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index bb8741b..d5a9205 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: CustomDimensions main: buttondevteam.customdimensions.CustomDimensions -version: '1.0' +version: '1.1' api-version: '1.16' loadbefore: - Multiverse-Core \ No newline at end of file