Moved WorldPreset creating to DataGen step
This commit is contained in:
parent
ad0a82c2f0
commit
a592c05b4d
26 changed files with 452 additions and 431 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.bclib.mixin.common;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeRegistry;
|
||||
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
|
@ -29,11 +30,17 @@ public abstract class BuiltinRegistriesMixin {
|
|||
//this needs to be added BEFORE the WORLD_PRESET-Registry. Otherwise decoding will fail!
|
||||
@Inject(method = "<clinit>", at = @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/core/registries/BuiltInRegistries;registerSimple(Lnet/minecraft/resources/ResourceKey;Lnet/minecraft/core/registries/BuiltInRegistries$RegistryBootstrap;)Lnet/minecraft/core/Registry;"))
|
||||
private static void bcl_registerBuiltin(CallbackInfo ci) {
|
||||
BCLBiomeRegistry.BUILTIN_BCL_BIOMES = internalRegister(
|
||||
BCLBiomeRegistry.BCL_BIOMES_REGISTRY,
|
||||
BCLBiomeRegistry.BUILTIN_BCL_BIOMES,
|
||||
BCLBiomeRegistry::bootstrap,
|
||||
Lifecycle.stable()
|
||||
);
|
||||
BCLBiomeRegistry.ensureStaticallyLoaded();
|
||||
if (BCLib.isDatagen()) {
|
||||
// BCLBiomeRegistry.BUILTIN_BCL_BIOMES = internalRegister(
|
||||
// BCLBiomeRegistry.BCL_BIOMES_REGISTRY,
|
||||
// new MappedRegistry<>(
|
||||
// BCLBiomeRegistry.BCL_BIOMES_REGISTRY,
|
||||
// Lifecycle.stable()
|
||||
// ),
|
||||
// BCLBiomeRegistry::bootstrap,
|
||||
// Lifecycle.stable()
|
||||
// );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue