This commit is contained in:
Frank 2022-10-26 00:06:06 +02:00
parent 9fcec2b033
commit 409534e6f1
9 changed files with 39 additions and 68 deletions

View file

@ -16,7 +16,7 @@ import java.util.ArrayList;
import java.util.List;
@Mixin(RegistryDataLoader.class)
public abstract class RegistryAccessMixin {
public abstract class RegistryDataLoaderMixin {
@Accessor("WORLDGEN_REGISTRIES")
@Mutable
static void wt_set_WORLDGEN_REGISTRIES(List<RegistryDataLoader.RegistryData<?>> list) {
@ -33,29 +33,4 @@ public abstract class RegistryAccessMixin {
));
wt_set_WORLDGEN_REGISTRIES(enhanced);
}
//TODO: 1.19.3 This will probably be a new kind of DataProvider.
// @ModifyArg(method = "<clinit>", at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;make(Ljava/util/function/Supplier;)Ljava/lang/Object;"))
// private static Supplier<ImmutableMap<ResourceKey<Registry<?>>, RegistryAccess.RegistryData<?>>> together_addRegistry(
// Supplier<ImmutableMap<ResourceKey<Registry<?>>, RegistryAccess.RegistryData<?>>> supplier
// ) {
//
// return () -> {
// Map<ResourceKey<Registry<?>>, RegistryAccess.RegistryData<?>> res = supplier.get();
// ImmutableMap.Builder<ResourceKey<Registry<?>>, RegistryAccess.RegistryData<?>> builder = ImmutableMap.builder();
//
// builder.putAll(res);
// put(builder, SurfaceRuleRegistry.SURFACE_RULES_REGISTRY, AssignedSurfaceRule.CODEC);
// return builder.build();
// };
// }
//
// @Shadow
// static <E> void put(
// ImmutableMap.Builder<ResourceKey<Registry<?>>, RegistryAccess.RegistryData<?>> builder,
// ResourceKey<? extends Registry<E>> resourceKey,
// Codec<E> codec
// ) {
// throw new RuntimeException("Shadowed Call");
// }
}

View file

@ -47,8 +47,7 @@ public abstract class WorldPresetsBootstrapMixin {
private Holder<NoiseGeneratorSettings> endNoiseSettings;
//see WorldPresets.register
//TODO: 1.19.3
@ModifyArg(method = "run", at = @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/world/level/levelgen/presets/WorldPresets$Bootstrap;registerCustomOverworldPreset(Lnet/minecraft/resources/ResourceKey;Lnet/minecraft/world/level/dimension/LevelStem;)Lnet/minecraft/core/Holder;"))
private LevelStem bcl_getOverworldStem(LevelStem overworldStem) {
WorldGenUtil.Context netherContext = new WorldGenUtil.Context(