From d176bab28e265263908b0bb509a23734d0d53516 Mon Sep 17 00:00:00 2001 From: noeppi_noeppi <63002502+noeppi-noeppi@users.noreply.github.com> Date: Tue, 20 Dec 2022 00:18:52 +0100 Subject: [PATCH] Add a method to LootContext.Builder that allows changing the queried loot table id (#9084) --- .../world/level/storage/loot/LootContext.java.patch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/world/level/storage/loot/LootContext.java.patch b/patches/minecraft/net/minecraft/world/level/storage/loot/LootContext.java.patch index 859e219584..bd2369ae55 100644 --- a/patches/minecraft/net/minecraft/world/level/storage/loot/LootContext.java.patch +++ b/patches/minecraft/net/minecraft/world/level/storage/loot/LootContext.java.patch @@ -48,8 +48,15 @@ public LootContext.Builder m_230911_(RandomSource p_230912_) { this.f_78958_ = p_230912_; return this; -@@ -191,7 +_,7 @@ +@@ -189,9 +_,14 @@ + return (T)this.f_78956_.get(p_78983_); + } ++ public LootContext.Builder withQueriedLootTableId(ResourceLocation queriedLootTableId) { ++ this.queriedLootTableId = queriedLootTableId; ++ return this; ++ } ++ public LootContext m_78975_(LootContextParamSet p_78976_) { Set> set = Sets.difference(this.f_78956_.keySet(), p_78976_.m_81398_()); - if (!set.isEmpty()) {