This commit is contained in:
KennyTV 2020-02-01 12:44:56 +01:00
parent 152b9db80f
commit 2334f6c5c9

View File

@ -47,7 +47,8 @@ public abstract class LegacyBlockItemRewriter<T extends BackwardsProtocol> exten
JsonPrimitive jsonData = object.getAsJsonPrimitive("data"); JsonPrimitive jsonData = object.getAsJsonPrimitive("data");
short data = jsonData != null ? jsonData.getAsShort() : 0; short data = jsonData != null ? jsonData.getAsShort() : 0;
String name = object.getAsJsonPrimitive("name").getAsString(); String name = object.getAsJsonPrimitive("name").getAsString();
boolean block = object.getAsJsonPrimitive("block").getAsBoolean(); JsonPrimitive blockField = object.getAsJsonPrimitive("block");
boolean block = blockField != null && blockField.getAsBoolean();
if (dataEntry.getKey().contains("-")) { if (dataEntry.getKey().contains("-")) {
// Range of ids // Range of ids