Update mappings.

This commit is contained in:
modmuss50
2022-02-16 18:14:59 +00:00
parent 682a9b7c63
commit 55dca1a4f3
14 changed files with 24 additions and 24 deletions

View File

@@ -62,7 +62,7 @@ public class MixinBootstrap {
RegistrySyncManager.bootstrapRegistries();
}
@Redirect(method = "initialize", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/registry/Registry;method_40292()V"))
@Redirect(method = "initialize", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/registry/Registry;freezeRegistries()V"))
private static void skipFreeze() {
// Don't freeze
}

View File

@@ -29,8 +29,8 @@ import net.fabricmc.fabric.impl.registry.sync.DynamicRegistrySync;
@Mixin(DynamicRegistryManager.class)
public interface MixinDynamicRegistryManager {
@Inject(method = "method_40314", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/EntryLoader$Impl;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
private static void onCreateImpl(CallbackInfoReturnable<DynamicRegistryManager.class_6893> cir, DynamicRegistryManager.class_6893 registryManager) {
@Inject(method = "createAndLoad", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/EntryLoader$Impl;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
private static void onCreateImpl(CallbackInfoReturnable<DynamicRegistryManager.Mutable> cir, DynamicRegistryManager.Mutable registryManager) {
DynamicRegistrySetupCallback.EVENT.invoker().onRegistrySetup(registryManager);
}
@@ -38,8 +38,8 @@ public interface MixinDynamicRegistryManager {
* Ensures that any registrations made into {@link net.minecraft.util.registry.BuiltinRegistries} after
* {@link DynamicRegistryManager} has been class-loaded are still propagated.
*/
@Inject(method = "method_40327()Lnet/minecraft/util/registry/DynamicRegistryManager$class_6890;", at = @At(value = "RETURN"))
private static void setupBuiltInSync(CallbackInfoReturnable<DynamicRegistryManager.class_6890> cir) {
@Inject(method = "method_40327", at = @At(value = "RETURN"))
private static void setupBuiltInSync(CallbackInfoReturnable<DynamicRegistryManager.Immutable> cir) {
DynamicRegistrySync.setupSync(cir.getReturnValue());
}
}

View File

@@ -40,7 +40,7 @@ public class MixinMinecraftServer {
if (FabricLoader.getInstance().getEnvironmentType() == EnvType.SERVER) {
// Freeze the registries on the server
FABRIC_LOGGER.debug("Freezing registries");
Registry.method_40292();
Registry.freezeRegistries();
}
}
}

View File

@@ -50,6 +50,6 @@ public class MixinMinecraftClient {
private void onStart(CallbackInfo ci) {
// Freeze the registries on the client
FABRIC_LOGGER.debug("Freezing registries");
Registry.method_40292();
Registry.freezeRegistries();
}
}

View File

@@ -145,13 +145,13 @@ public class RegistrySyncTest implements ModInitializer {
// Force-Initialize the dynamic registry manager, doing this in a Mod initializer would cause
// further registrations into BuiltInRegistries to _NOT_ propagate into DynamicRegistryManager.BUILTIN
checkFeature(DynamicRegistryManager.method_40314(), f1Id);
checkFeature(DynamicRegistryManager.createAndLoad(), f1Id);
ConfiguredFeature<DefaultFeatureConfig, ?> cf2 = new ConfiguredFeature<>(Feature.DESERT_WELL, DefaultFeatureConfig.INSTANCE);
Identifier f2Id = new Identifier("registry_sync", "f2");
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, f2Id, cf2);
DynamicRegistryManager impl2 = DynamicRegistryManager.method_40314();
DynamicRegistryManager impl2 = DynamicRegistryManager.createAndLoad();
checkFeature(impl2, f1Id);
checkFeature(impl2, f2Id);
}