From 0633e8218f9fe0ad239959a02bb984b87638cb4c Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 9 Jul 2019 18:21:05 -0700 Subject: [PATCH] Added LootPool.Builder#bonusRolls setter. Closes #5887 --- .../net/minecraft/world/storage/loot/LootPool.java.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch index 903e7c85f..099500986 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch @@ -54,7 +54,7 @@ public LootPool.Builder func_216046_a(IRandomRange p_216046_1_) { this.field_216050_d = p_216046_1_; -@@ -144,15 +147,56 @@ +@@ -144,15 +147,61 @@ return this; } @@ -62,6 +62,11 @@ + this.name = name; + return this; + } ++ ++ public LootPool.Builder bonusRolls(float min, float max) { ++ this.field_216051_e = new RandomValueRange(min, max); ++ return this; ++ } + public LootPool func_216044_b() { if (this.field_216050_d == null) { @@ -112,7 +117,7 @@ public static class Serializer implements JsonDeserializer, JsonSerializer { public LootPool deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException { JsonObject jsonobject = JSONUtils.func_151210_l(p_deserialize_1_, "loot pool"); -@@ -161,18 +205,20 @@ +@@ -161,18 +210,20 @@ ILootFunction[] ailootfunction = JSONUtils.func_188177_a(jsonobject, "functions", new ILootFunction[0], p_deserialize_3_, ILootFunction[].class); IRandomRange irandomrange = RandomRanges.func_216130_a(jsonobject.get("rolls"), p_deserialize_3_); RandomValueRange randomvaluerange = JSONUtils.func_188177_a(jsonobject, "bonus_rolls", new RandomValueRange(0.0F, 0.0F), p_deserialize_3_, RandomValueRange.class);