public Short getShort(String key) { return (Short) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_SHORT, key); }
public Boolean hasKey(String key) { Boolean b = (Boolean) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_HAS_KEY, key); if(b == null)return false; return b; }
public Double getDouble(String key) { return (Double) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_DOUBLE, key); }
public int[] getIntArray(String key) { return (int[]) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_INTARRAY, key); }
public Float getFloat(String key) { return (Float) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_FLOAT, key); }
public String getString(String key) { return (String) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_STRING, key); }
public byte[] getByteArray(String key) { return (byte[]) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_BYTEARRAY, key); }
public Boolean getBoolean(String key) { return (Boolean) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_BOOLEAN, key); }
public Integer getInteger(String key) { return (Integer) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_INT, key); }
public Byte getByte(String key) { return (Byte) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_BYTE, key); }
public Long getLong(String key) { return (Long) NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_LONG, key); }
public static <T> T getObject(NBTCompound comp, String key, Class<T> type) { if (!MinecraftVersion.hasGsonSupport()) return null; String json = (String) getData(comp, ReflectionMethod.COMPOUND_GET_STRING, key); if (json == null) { return null; } return GsonWrapper.deserializeJson(json, type); }
public NBTType getType(String name) { if (MinecraftVersion.getVersion() == MinecraftVersion.MC1_7_R4) return null; Object o = NBTReflectionUtil.getData(this, ReflectionMethod.COMPOUND_GET_TYPE, name); if(o == null)return null; return NBTType.valueOf((byte) o); }