Update to 1.16.3
This commit is contained in:
parent
11c870101d
commit
a1f6464b60
3 changed files with 7 additions and 7 deletions
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>com.github.TBMCPlugins</groupId>
|
||||
<artifactId>CustomDimensions</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.3-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -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<NBTBase> registryreadops = RegistryReadOps.a(DynamicOpsNBT.a, console.dataPackResources.h(), console.f);
|
||||
RegistryReadOps<NBTBase> 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<DimensionManager> dimManResKey = ResourceKey.a(IRegistry.K, dimKey.a());
|
||||
//Replace existing dimension manager, correctly setting the ID up (which is -1 for default worlds...)
|
||||
((RegistryMaterials<DimensionManager>) console.f.a()).a(OptionalInt.empty(), dimManResKey, dimensionmanager, Lifecycle.stable());
|
||||
((RegistryMaterials<DimensionManager>) console.customRegistry.a()).a(OptionalInt.empty(), dimManResKey, dimensionmanager, Lifecycle.stable());
|
||||
|
||||
var worldloadlistener = console.worldLoadListenerFactory.create(11);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: CustomDimensions
|
||||
main: buttondevteam.customdimensions.CustomDimensions
|
||||
version: '1.0'
|
||||
version: '1.1'
|
||||
api-version: '1.16'
|
||||
loadbefore:
|
||||
- Multiverse-Core
|
Loading…
Reference in a new issue