diff --git a/src/main/java/org/betterx/worlds/together/mixin/client/CreateWorldScreenMixin.java b/src/main/java/org/betterx/worlds/together/mixin/client/CreateWorldScreenMixin.java index 1d3f9c22..bf97ed5a 100644 --- a/src/main/java/org/betterx/worlds/together/mixin/client/CreateWorldScreenMixin.java +++ b/src/main/java/org/betterx/worlds/together/mixin/client/CreateWorldScreenMixin.java @@ -34,7 +34,7 @@ public class CreateWorldScreenMixin { public WorldGenSettingsComponent worldGenSettingsComponent; @Inject(method = "", at = @At("TAIL")) - private void bcl_init( + private void wt_init( Screen screen, DataPackConfig dataPackConfig, WorldGenSettingsComponent worldGenSettingsComponent, @@ -45,13 +45,13 @@ public class CreateWorldScreenMixin { //Change the WorldPreset that is selected by default on the Create World Screen @ModifyArg(method = "openFresh", index = 1, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/worldselection/WorldGenSettingsComponent;(Lnet/minecraft/client/gui/screens/worldselection/WorldCreationContext;Ljava/util/Optional;Ljava/util/OptionalLong;)V")) - private static Optional> bcl_NewDefault(Optional> preset) { + private static Optional> wt_NewDefault(Optional> preset) { return Optional.of(WorldPresets.getDEFAULT()); } //Make sure the WorldGenSettings used to populate the create screen match the default WorldPreset @ModifyArg(method = "openFresh", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/WorldLoader;load(Lnet/minecraft/server/WorldLoader$InitConfig;Lnet/minecraft/server/WorldLoader$WorldDataSupplier;Lnet/minecraft/server/WorldLoader$ResultFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;")) - private static WorldLoader.WorldDataSupplier bcl_NewDefaultSettings(WorldLoader.WorldDataSupplier worldDataSupplier) { + private static WorldLoader.WorldDataSupplier wt_NewDefaultSettings(WorldLoader.WorldDataSupplier worldDataSupplier) { return (resourceManager, dataPackConfig) -> { Pair res = worldDataSupplier.get(resourceManager, dataPackConfig); return WorldGenUtil.defaultWorldDataSupplier(res.getSecond()); @@ -60,7 +60,7 @@ public class CreateWorldScreenMixin { //this is called when a new world is first created @Inject(method = "createNewWorldDirectory", at = @At("RETURN")) - void bcl_createNewWorld(CallbackInfoReturnable> cir) { + void wt_createNewWorld(CallbackInfoReturnable> cir) { WorldBootstrap.InGUI.registryReadyOnNewWorld(this.worldGenSettingsComponent); WorldBootstrap.InGUI.setupNewWorld(cir.getReturnValue(), this.worldGenSettingsComponent); } diff --git a/src/main/java/org/betterx/worlds/together/mixin/client/WorldOpenFlowsMixin.java b/src/main/java/org/betterx/worlds/together/mixin/client/WorldOpenFlowsMixin.java index 6da1e173..8319df0c 100644 --- a/src/main/java/org/betterx/worlds/together/mixin/client/WorldOpenFlowsMixin.java +++ b/src/main/java/org/betterx/worlds/together/mixin/client/WorldOpenFlowsMixin.java @@ -32,7 +32,7 @@ public abstract class WorldOpenFlowsMixin { protected abstract void doLoadLevel(Screen screen, String levelID, boolean safeMode, boolean canAskForBackup); @Inject(method = "loadLevel", cancellable = true, at = @At("HEAD")) - private void bcl_callFixerOnLoad(Screen screen, String levelID, CallbackInfo ci) { + private void wt_callFixerOnLoad(Screen screen, String levelID, CallbackInfo ci) { WorldBootstrap.InGUI.setupLoadedWorld(levelID, this.levelSource); //if (DataFixerAPI.fixData(this.levelSource, levelID, true, (appliedFixes) -> { @@ -53,7 +53,7 @@ public abstract class WorldOpenFlowsMixin { } @Inject(method = "createFreshLevel", at = @At("HEAD")) - public void bcl_createFreshLevel( + public void wt_createFreshLevel( String levelID, LevelSettings levelSettings, RegistryAccess registryAccess, @@ -64,7 +64,7 @@ public abstract class WorldOpenFlowsMixin { } @Inject(method = "createLevelFromExistingSettings", at = @At("HEAD")) - public void bcl_createLevelFromExistingSettings( + public void wt_createLevelFromExistingSettings( LevelStorageSource.LevelStorageAccess levelStorageAccess, ReloadableServerResources reloadableServerResources, RegistryAccess.Frozen frozen, diff --git a/src/main/java/org/betterx/worlds/together/mixin/common/WorldGenPropertiesMixin.java b/src/main/java/org/betterx/worlds/together/mixin/common/WorldGenPropertiesMixin.java index dfd9a13f..99ae7a09 100644 --- a/src/main/java/org/betterx/worlds/together/mixin/common/WorldGenPropertiesMixin.java +++ b/src/main/java/org/betterx/worlds/together/mixin/common/WorldGenPropertiesMixin.java @@ -12,14 +12,14 @@ import org.spongepowered.asm.mixin.injection.ModifyArg; @Mixin(DedicatedServerProperties.WorldGenProperties.class) public class WorldGenPropertiesMixin { - @ModifyArg(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/presets/WorldPreset;createWorldGenSettings(JZZ)Lnet/minecraft/world/level/levelgen/WorldGenSettings;")) - public long bcl_create(long seed) { - return seed; - } +// @ModifyArg(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/presets/WorldPreset;createWorldGenSettings(JZZ)Lnet/minecraft/world/level/levelgen/WorldGenSettings;")) +// public long wt_getSeed(long seed) { +// return seed; +// } //Make sure Servers use our Default World Preset @ModifyArg(method = "create", at = @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/core/Registry;getHolder(Lnet/minecraft/resources/ResourceKey;)Ljava/util/Optional;")) - private ResourceKey bcl_foo(ResourceKey resourceKey) { + private ResourceKey wt_returnDefault(ResourceKey resourceKey) { return WorldPresets.getDEFAULT(); } } \ No newline at end of file