2020-06-24 00:56:24 +00:00
|
|
|
--- a/net/minecraft/loot/LootContext.java
|
|
|
|
+++ b/net/minecraft/loot/LootContext.java
|
2019-12-11 02:27:07 +00:00
|
|
|
@@ -94,6 +94,10 @@
|
2019-05-23 23:02:15 +00:00
|
|
|
return this.field_186499_b;
|
2018-09-21 22:50:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+ public int getLootingModifier() {
|
2019-05-23 23:02:15 +00:00
|
|
|
+ return net.minecraftforge.common.ForgeHooks.getLootingLevel(func_216031_c(LootParameters.field_216281_a), func_216031_c(LootParameters.field_216284_d), func_216031_c(LootParameters.field_216283_c));
|
2018-09-21 22:50:37 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public static class Builder {
|
2019-05-23 23:02:15 +00:00
|
|
|
private final ServerWorld field_186474_a;
|
|
|
|
private final Map<LootParameter<?>, Object> field_216025_b = Maps.newIdentityHashMap();
|
2020-02-27 06:13:36 +00:00
|
|
|
@@ -105,6 +109,14 @@
|
|
|
|
this.field_186474_a = p_i46993_1_;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public Builder(LootContext context) {
|
|
|
|
+ this.field_186474_a = context.field_186499_b;
|
|
|
|
+ this.field_216025_b.putAll(context.field_216036_f);
|
|
|
|
+ this.field_216026_c.putAll(context.field_216037_g);
|
|
|
|
+ this.field_216027_d = context.field_216035_a;
|
|
|
|
+ this.field_186475_b = context.field_186498_a;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public LootContext.Builder func_216023_a(Random p_216023_1_) {
|
|
|
|
this.field_216027_d = p_216023_1_;
|
|
|
|
return this;
|