From b8eca88f75be6b0800f933d464f13675dfaa9df2 Mon Sep 17 00:00:00 2001 From: Alex O'Neill <35673674+alcatrazEscapee@users.noreply.github.com> Date: Mon, 15 Feb 2021 17:52:00 -0500 Subject: [PATCH] Allow mods to use additional custom LootParameter when querying existing loot tables (#7515) --- .../minecraft/net/minecraft/loot/LootContext.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/minecraft/net/minecraft/loot/LootContext.java.patch b/patches/minecraft/net/minecraft/loot/LootContext.java.patch index e17f90babc..e6b95b38e8 100644 --- a/patches/minecraft/net/minecraft/loot/LootContext.java.patch +++ b/patches/minecraft/net/minecraft/loot/LootContext.java.patch @@ -48,6 +48,15 @@ public LootContext.Builder func_216023_a(Random p_216023_1_) { this.field_216027_d = p_216023_1_; return this; +@@ -177,7 +207,7 @@ + + public LootContext func_216022_a(LootParameterSet p_216022_1_) { + Set> set = Sets.difference(this.field_216025_b.keySet(), p_216022_1_.func_216276_b()); +- if (!set.isEmpty()) { ++ if (false && !set.isEmpty()) { // Forge: Allow mods to pass custom loot parameters (not part of the vanilla loot table) to the loot context. + throw new IllegalArgumentException("Parameters not allowed in this parameter set: " + set); + } else { + Set> set1 = Sets.difference(p_216022_1_.func_216277_a(), this.field_216025_b.keySet()); @@ -190,7 +220,7 @@ }