This commit is contained in:
Jesse Boyd
2019-08-07 01:29:09 +10:00
parent 74fe88ae01
commit a3c58a187e
49 changed files with 604 additions and 808 deletions

View File

@ -20,13 +20,14 @@
package com.sk89q.jnbt;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* A class which holds constant values.
*/
public final class NBTConstants {
public static final Charset CHARSET = Charset.forName("UTF-8");
public static final Charset CHARSET = StandardCharsets.UTF_8;
public static final int TYPE_END = 0, TYPE_BYTE = 1, TYPE_SHORT = 2,
TYPE_INT = 3, TYPE_LONG = 4, TYPE_FLOAT = 5, TYPE_DOUBLE = 6,
@ -39,10 +40,10 @@ public final class NBTConstants {
private NBTConstants() {
}
/**
* Convert a type ID to its corresponding {@link Tag} class.
*
*
* @param id type ID
* @return tag class
* @throws IllegalArgumentException thrown if the tag ID is not valid