Fix custom loot serializers using wrong registry names

This commit is contained in:
Curle committed 2021-12-01 01:21:21 +00:00
1 parent 54b2c18fcf
commit 530a1e8eb0
1 file changed
+3 -1
@@ -128,7 +128,9 @@ public class LootModifierManager extends SimpleJsonResourceReloadListener {
JsonObject object = element.getAsJsonObject();
LootItemCondition[] lootConditions = GSON_INSTANCE.fromJson(object.get("conditions"), LootItemCondition[].class);
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.getValue(location).read(location, object, lootConditions);
ResourceLocation serializer = new ResourceLocation(GsonHelper.getAsString(object, "type"));
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.getValue(serializer).read(location, object, lootConditions);
}
public static GlobalLootModifierSerializer<?> getSerializerForName(ResourceLocation resourcelocation) {