From e84098a011e9aa3f89ecc276827c22d853600623 Mon Sep 17 00:00:00 2001 From: Girafi Date: Mon, 19 Dec 2022 17:05:08 +0100 Subject: [PATCH] [1.19.3] Fix LootTableLoadEvent not getting fired (#9239) --- .../minecraft/world/level/storage/loot/LootTables.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/world/level/storage/loot/LootTables.java.patch b/patches/minecraft/net/minecraft/world/level/storage/loot/LootTables.java.patch index 697ac20d3e..7b8005e2fe 100644 --- a/patches/minecraft/net/minecraft/world/level/storage/loot/LootTables.java.patch +++ b/patches/minecraft/net/minecraft/world/level/storage/loot/LootTables.java.patch @@ -6,7 +6,7 @@ try { - LootTable loottable = f_79189_.fromJson(p_79199_, LootTable.class); + net.minecraft.server.packs.resources.Resource res = p_79215_.m_213713_(getPreparedPath(p_79198_)).orElse(null); -+ LootTable loottable = net.minecraftforge.common.ForgeHooks.loadLootTable(f_79189_, p_79198_, p_79199_, res == null || !res.m_215506_().equals("Default"), this); ++ LootTable loottable = net.minecraftforge.common.ForgeHooks.loadLootTable(f_79189_, p_79198_, p_79199_, res == null || !res.m_215506_().equals(net.minecraft.server.packs.repository.BuiltInPackSource.f_243761_), this); builder.put(p_79198_, loottable); } catch (Exception exception) { f_79188_.error("Couldn't parse loot table {}", p_79198_, exception);