public static String fromGenericTag(Tag tag){
switch (tag.getType()) {
case BYTE:
    return fromTag((ByteTag)tag);
case BYTE_ARRAY:
  return fromTag((ByteArrayTag)tag);
case COMPOUND:
return fromTag((CompoundTag)tag);
case DOUBLE:
return fromTag((DoubleTag)tag);
case FLOAT:
return fromTag((FloatTag)tag);
case INT:
return fromTag((IntTag)tag);
case INT_ARRAY:
return fromTag((IntArrayTag)tag);
case LIST:
return fromTag((ListTag)tag);
case LONG:
return fromTag((LongTag)tag);
case SHORT:
return fromTag((ShortTag)tag);
case STRING:
return fromTag((StringTag)tag);
}
return null;
}

public static String fromGenericTag ( Tag tag ) { switch ( tag . getType ( ) ) { case BYTE : return fromTag ( ( ByteTag ) tag ) ; case BYTE_ARRAY : return fromTag ( ( ByteArrayTag ) tag ) ; case COMPOUND : return fromTag ( ( CompoundTag ) tag ) ; case DOUBLE : return fromTag ( ( DoubleTag ) tag ) ; case FLOAT : return fromTag ( ( FloatTag ) tag ) ; case INT : return fromTag ( ( IntTag ) tag ) ; case INT_ARRAY : return fromTag ( ( IntArrayTag ) tag ) ; case LIST : return fromTag ( ( ListTag ) tag ) ; case LONG : return fromTag ( ( LongTag ) tag ) ; case SHORT : return fromTag ( ( ShortTag ) tag ) ; case STRING : return fromTag ( ( StringTag ) tag ) ; } return null ; }
creates a mojangson string from the given nbt tag . convenience method for generic tags ( tag ) .
