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>
|
<groupId>com.github.TBMCPlugins</groupId>
|
||||||
<artifactId>CustomDimensions</artifactId>
|
<artifactId>CustomDimensions</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.1</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.16.2-R0.1-SNAPSHOT</version>
|
<version>1.16.3-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class CustomDimensions extends JavaPlugin implements Listener {
|
||||||
getLogger().info("Finished loading custom dimensions!");
|
getLogger().info("Finished loading custom dimensions!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load() throws Exception {
|
private void load() throws Exception {
|
||||||
var console = ((CraftServer) Bukkit.getServer()).getServer();
|
var console = ((CraftServer) Bukkit.getServer()).getServer();
|
||||||
var field = console.getClass().getSuperclass().getDeclaredField("saveData");
|
var field = console.getClass().getSuperclass().getDeclaredField("saveData");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
|
@ -63,14 +63,14 @@ public class CustomDimensions extends JavaPlugin implements Listener {
|
||||||
MinecraftServer.convertWorld(session);
|
MinecraftServer.convertWorld(session);
|
||||||
|
|
||||||
//Load world settings or create default values
|
//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);
|
WorldDataServer worlddata = (WorldDataServer) session.a(registryreadops, console.datapackconfiguration);
|
||||||
if (worlddata == null) {
|
if (worlddata == null) {
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
properties.put("level-seed", Objects.toString(mainWorld.getSeed()));
|
properties.put("level-seed", Objects.toString(mainWorld.getSeed()));
|
||||||
properties.put("generate-structures", Objects.toString(true));
|
properties.put("generate-structures", Objects.toString(true));
|
||||||
properties.put("level-type", WorldType.NORMAL.getName());
|
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,
|
WorldSettings worldSettings = new WorldSettings(name,
|
||||||
EnumGamemode.getById(Bukkit.getDefaultGameMode().getValue()),
|
EnumGamemode.getById(Bukkit.getDefaultGameMode().getValue()),
|
||||||
false, //Hardcore
|
false, //Hardcore
|
||||||
|
@ -92,7 +92,7 @@ public class CustomDimensions extends JavaPlugin implements Listener {
|
||||||
|
|
||||||
ResourceKey<DimensionManager> dimManResKey = ResourceKey.a(IRegistry.K, dimKey.a());
|
ResourceKey<DimensionManager> dimManResKey = ResourceKey.a(IRegistry.K, dimKey.a());
|
||||||
//Replace existing dimension manager, correctly setting the ID up (which is -1 for default worlds...)
|
//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);
|
var worldloadlistener = console.worldLoadListenerFactory.create(11);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: CustomDimensions
|
name: CustomDimensions
|
||||||
main: buttondevteam.customdimensions.CustomDimensions
|
main: buttondevteam.customdimensions.CustomDimensions
|
||||||
version: '1.0'
|
version: '1.1'
|
||||||
api-version: '1.16'
|
api-version: '1.16'
|
||||||
loadbefore:
|
loadbefore:
|
||||||
- Multiverse-Core
|
- Multiverse-Core
|
Loading…
Reference in a new issue