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