Added LootPool.Builder#bonusRolls setter. Closes #5887
This commit is contained in:
parent
0fdfe1fd59
commit
0633e8218f
1 changed files with 7 additions and 2 deletions
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
public LootPool.Builder func_216046_a(IRandomRange p_216046_1_) {
|
public LootPool.Builder func_216046_a(IRandomRange p_216046_1_) {
|
||||||
this.field_216050_d = p_216046_1_;
|
this.field_216050_d = p_216046_1_;
|
||||||
@@ -144,15 +147,56 @@
|
@@ -144,15 +147,61 @@
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,11 @@
|
||||||
+ this.name = name;
|
+ this.name = name;
|
||||||
+ return this;
|
+ 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() {
|
public LootPool func_216044_b() {
|
||||||
if (this.field_216050_d == null) {
|
if (this.field_216050_d == null) {
|
||||||
|
@ -112,7 +117,7 @@
|
||||||
public static class Serializer implements JsonDeserializer<LootPool>, JsonSerializer<LootPool> {
|
public static class Serializer implements JsonDeserializer<LootPool>, JsonSerializer<LootPool> {
|
||||||
public LootPool deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException {
|
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");
|
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);
|
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_);
|
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);
|
RandomValueRange randomvaluerange = JSONUtils.func_188177_a(jsonobject, "bonus_rolls", new RandomValueRange(0.0F, 0.0F), p_deserialize_3_, RandomValueRange.class);
|
||||||
|
|
Loading…
Reference in a new issue