From 62eb61a8e0c726faa30eaa3f4998ba1101368ee4 Mon Sep 17 00:00:00 2001 From: dhyces <10985914+dhyces@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:11:25 -0400 Subject: [PATCH] [1.21.3] Fix serialization of dynamic registry entries in data map datagen (#1648) --- .../net/neoforged/neoforge/common/data/DataMapProvider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/neoforged/neoforge/common/data/DataMapProvider.java b/src/main/java/net/neoforged/neoforge/common/data/DataMapProvider.java index 4c32559074..a19f34bcc0 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/DataMapProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/DataMapProvider.java @@ -25,7 +25,6 @@ import net.minecraft.data.CachedOutput; import net.minecraft.data.DataProvider; import net.minecraft.data.PackOutput; -import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; @@ -63,7 +62,7 @@ public CompletableFuture run(CachedOutput cache) { return lookupProvider.thenCompose(provider -> { gather(provider); - final DynamicOps dynamicOps = RegistryOps.create(JsonOps.INSTANCE, provider); + final DynamicOps dynamicOps = provider.createSerializationContext(JsonOps.INSTANCE); return CompletableFuture.allOf(this.builders.entrySet().stream().map(entry -> { DataMapType type = entry.getKey();