@ParametersAreNonnullByDefault
public interface CodecUtils_v1_20_3
| Modifier and Type | Method and Description |
|---|---|
default boolean |
containsArray(com.google.gson.JsonObject obj,
java.lang.String name)
Check if the given json object contains a json array.
|
default boolean |
containsObject(com.google.gson.JsonObject obj,
java.lang.String name)
Check if the given json object contains a json object.
|
default boolean |
containsString(com.google.gson.JsonObject obj,
java.lang.String name)
Check if the given json object contains a boolean.
|
default boolean |
isNumber(com.google.gson.JsonElement element)
Check if the given element is a number.
|
default boolean |
isObject(com.google.gson.JsonElement element)
Check if the given element is an array.
|
default boolean |
isString(com.google.gson.JsonElement element)
Check if the given element is a string.
|
default java.lang.Boolean |
optionalBoolean(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get an optional boolean or null if not present.
|
default java.lang.Boolean |
optionalBoolean(com.google.gson.JsonObject obj,
java.lang.String name)
Get an optional boolean or null if not present.
|
default net.lenni0451.mcstructs.nbt.tags.CompoundTag |
optionalCompound(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get an optional compound tag or null if not present.
|
default java.lang.Integer |
optionalInt(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get an optional int or null if not present.
|
default java.lang.Integer |
optionalInt(com.google.gson.JsonObject obj,
java.lang.String name)
Get an optional int or null if not present.
|
default com.google.gson.JsonObject |
optionalObject(com.google.gson.JsonObject obj,
java.lang.String name)
Get an optional json object or null if not present.
|
default java.lang.String |
optionalString(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get an optional string or null if not present.
|
default java.lang.String |
optionalString(com.google.gson.JsonObject obj,
java.lang.String name)
Get an optional string or null if not present.
|
default boolean |
requiredBoolean(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get a required boolean or throw an exception if not present.
|
default boolean |
requiredBoolean(com.google.gson.JsonObject obj,
java.lang.String name)
Get a required boolean or throw an exception if not present.
|
default net.lenni0451.mcstructs.nbt.tags.CompoundTag |
requiredCompound(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get a required compound tag or throw an exception if not present.
|
default int |
requiredInt(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get a required int or throw an exception if not present.
|
default int |
requiredInt(com.google.gson.JsonObject obj,
java.lang.String name)
Get a required int or throw an exception if not present.
|
default com.google.gson.JsonObject |
requiredObject(com.google.gson.JsonObject obj,
java.lang.String name)
Get a required json object or throw an exception if not present.
|
default java.lang.String |
requiredString(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
Get a required string or throw an exception if not present.
|
default java.lang.String |
requiredString(com.google.gson.JsonObject obj,
java.lang.String name)
Get a required string or throw an exception if not present.
|
default java.util.List<net.lenni0451.mcstructs.nbt.INbtTag> |
unwrapMarkers(net.lenni0451.mcstructs.nbt.tags.ListTag<?> list)
Unwrap all marker tags from the given list.
|
default java.util.List<net.lenni0451.mcstructs.nbt.INbtTag> unwrapMarkers(net.lenni0451.mcstructs.nbt.tags.ListTag<?> list)
{"":123}).list - The list to unwrapdefault boolean isString(@Nullable
com.google.gson.JsonElement element)
element - The element to checkdefault boolean isNumber(@Nullable
com.google.gson.JsonElement element)
element - The element to checkdefault boolean isObject(@Nullable
com.google.gson.JsonElement element)
element - The element to checkdefault boolean containsString(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to checkname - The name of the booleandefault boolean containsArray(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to checkname - The name of the arraydefault boolean containsObject(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to checkname - The name of the object@Nullable
default java.lang.Boolean optionalBoolean(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the boolean fromname - The name of the boolean@Nullable
default java.lang.Boolean optionalBoolean(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the boolean fromname - The name of the boolean@Nullable
default java.lang.Integer optionalInt(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the int fromname - The name of the int@Nullable
default java.lang.Integer optionalInt(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the int fromname - The name of the int@Nullable
default java.lang.String optionalString(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the string fromname - The name of the string@Nullable
default java.lang.String optionalString(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the string fromname - The name of the string@Nullable
default net.lenni0451.mcstructs.nbt.tags.CompoundTag optionalCompound(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the compound fromname - The name of the compound@Nullable
default com.google.gson.JsonObject optionalObject(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the object fromname - The name of the objectdefault boolean requiredBoolean(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the boolean fromname - The name of the booleanjava.lang.IllegalArgumentException - If the boolean is not presentdefault boolean requiredBoolean(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the boolean fromname - The name of the booleandefault int requiredInt(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the int fromname - The name of the intdefault int requiredInt(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the int fromname - The name of the intdefault java.lang.String requiredString(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the string fromname - The name of the stringdefault java.lang.String requiredString(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the string fromname - The name of the stringdefault net.lenni0451.mcstructs.nbt.tags.CompoundTag requiredCompound(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag,
java.lang.String name)
tag - The tag to get the compound fromname - The name of the compounddefault com.google.gson.JsonObject requiredObject(com.google.gson.JsonObject obj,
java.lang.String name)
obj - The object to get the object fromname - The name of the object