public class NBTMapper extends Object
| Constructor and Description |
|---|
NBTMapper() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getTagValue(Tag<?> t,
Class<? extends T> clazz)
Takes in an NBT tag, sanely checks null status, and then returns it value.
|
static Object |
toTagValue(Tag<?> t)
Takes in an NBT tag, sanely checks null status, and then returns its value.
|
static <T,U extends T> |
toTagValue(Tag<?> t,
Class<? extends T> clazz,
U defaultValue)
Takes in an NBT tag, sanely checks null status, and then returns it value.
|
public static Object toTagValue(Tag<?> t)
t - Tag to get value frompublic static <T> T getTagValue(Tag<?> t, Class<? extends T> clazz)
t - Tag to get the value fromclazz - the return type to usepublic static <T,U extends T> T toTagValue(Tag<?> t, Class<? extends T> clazz, U defaultValue)
t - Tag to get the value fromdefaultValue - the value to return if the tag or its value is null or the value cannot be castCopyright © 2011–2014 Flow Powered. All rights reserved.