Use getAsInt and getAsDouble

This commit is contained in:
ALS 2021-02-20 23:54:25 +01:00
parent 0f9a2b5b4f
commit b842f07c3c

View File

@ -160,10 +160,10 @@ public final class NBTUtils {
uuid = Utils.intArrayToUuid(uuidArray);
}
final double value = attributeNBT.getNumber("Amount").doubleValue();
final double value = attributeNBT.getAsDouble("Amount");
final String slot = attributeNBT.containsKey("Slot") ? attributeNBT.getString("Slot") : "MAINHAND";
final String attributeName = attributeNBT.getString("AttributeName");
final int operation = attributeNBT.getNumber("Operation").intValue();
final int operation = attributeNBT.getAsInt("Operation");
final String name = attributeNBT.getString("Name");
final Attribute attribute = Attribute.fromKey(attributeName);