use of net.glowstone.util.nbt.LongTag in project Glowstone by GlowstoneMC.
the class Mojangson method fromTag.
/**
* Creates a Mojangson string from the given LongArray Tag.
*
* @param tag the LongArray Tag to convert
* @return the converted Mojangson string
*/
public static String fromTag(LongArrayTag tag) {
StringBuilder builder = new StringBuilder();
builder.append(ARRAY_START);
boolean start = true;
for (long value : tag.getValue()) {
LongTag i = new LongTag(value);
if (start) {
start = false;
} else {
builder.append(ELEMENT_SEPERATOR);
}
builder.append(fromTag(i));
}
builder.append(ARRAY_END);
return builder.toString();
}
Aggregations