Fixed Sieve and Hammer recipes not properly reporting missing result_amount
Closes #184
This commit is contained in:
parent
67079effd7
commit
89f71e7a29
|
|
@ -1,5 +1,6 @@
|
||||||
## Ex Deorum 1.50
|
## Ex Deorum 1.50
|
||||||
- Fixed Crucible bug where pending solids could be converted to another fluid while tank was empty (#180)
|
- Fixed Crucible bug where pending solids could be converted to another fluid while tank was empty (#180)
|
||||||
|
- Fixed Sieve and Hammer recipes not properly reporting missing `result_amount` (#184)
|
||||||
|
|
||||||
## Ex Deorum 1.49
|
## Ex Deorum 1.49
|
||||||
- Fixed more issues with _Thirst Was Taken_, thanks to pawjwp (#170)
|
- Fixed more issues with _Thirst Was Taken_, thanks to pawjwp (#170)
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,14 @@ public final class RecipeUtil {
|
||||||
|
|
||||||
public static NumberProvider readNumberProvider(JsonObject json, String key) {
|
public static NumberProvider readNumberProvider(JsonObject json, String key) {
|
||||||
var obj = json.get(key);
|
var obj = json.get(key);
|
||||||
return LootDataType.PREDICATE.parser().fromJson(obj, NumberProvider.class);
|
if (obj == null || obj.isJsonNull()) {
|
||||||
|
throw new JsonSyntaxException("Missing required \"" + key + "\" number provider");
|
||||||
|
}
|
||||||
|
var provider = LootDataType.PREDICATE.parser().fromJson(obj, NumberProvider.class);
|
||||||
|
if (provider == null) {
|
||||||
|
throw new JsonSyntaxException("Invalid \"" + key + "\" number provider: " + obj);
|
||||||
|
}
|
||||||
|
return provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void toNetworkNumberProvider(FriendlyByteBuf buffer, NumberProvider provider) {
|
public static void toNetworkNumberProvider(FriendlyByteBuf buffer, NumberProvider provider) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user