Add a method to LootContext.Builder that allows changing the queried loot table id (#9084)

This commit is contained in:
noeppi_noeppi authored and GitHub committed 2022-12-19 15:18:52 -08:00
1 parent 58d6f072e4
commit d176bab28e
1 file changed
+8 -1
@@ -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<LootContextParam<?>> set = Sets.difference(this.f_78956_.keySet(), p_78976_.m_81398_());
- if (!set.isEmpty()) {