Package net.minecraft.nbt
Class CompoundNBT
- java.lang.Object
-
- net.minecraft.nbt.CompoundNBT
-
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<CompoundNBT>
CODEC
private static org.apache.logging.log4j.Logger
LOGGER
private static java.util.regex.Pattern
SIMPLE_VALUE
private java.util.Map<java.lang.String,INBT>
tags
static INBTType<CompoundNBT>
TYPE
-
Fields inherited from interface net.minecraft.nbt.INBT
SYNTAX_HIGHLIGHTING_KEY, SYNTAX_HIGHLIGHTING_NUMBER, SYNTAX_HIGHLIGHTING_NUMBER_TYPE, SYNTAX_HIGHLIGHTING_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description CompoundNBT()
protected
CompoundNBT(java.util.Map<java.lang.String,INBT> p_i226075_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.String p_74764_1_)
boolean
contains(java.lang.String p_150297_1_, int p_150297_2_)
CompoundNBT
copy()
private CrashReport
createReport(java.lang.String p_229677_1_, INBTType<?> p_229677_2_, java.lang.ClassCastException p_229677_3_)
protected java.util.Map<java.lang.String,INBT>
entries()
boolean
equals(java.lang.Object p_equals_1_)
INBT
get(java.lang.String p_74781_1_)
java.util.Set<java.lang.String>
getAllKeys()
boolean
getBoolean(java.lang.String p_74767_1_)
byte
getByte(java.lang.String p_74771_1_)
byte[]
getByteArray(java.lang.String p_74770_1_)
CompoundNBT
getCompound(java.lang.String p_74775_1_)
double
getDouble(java.lang.String p_74769_1_)
float
getFloat(java.lang.String p_74760_1_)
byte
getId()
int
getInt(java.lang.String p_74762_1_)
int[]
getIntArray(java.lang.String p_74759_1_)
ListNBT
getList(java.lang.String p_150295_1_, int p_150295_2_)
long
getLong(java.lang.String p_74763_1_)
long[]
getLongArray(java.lang.String p_197645_1_)
ITextComponent
getPrettyDisplay(java.lang.String p_199850_1_, int p_199850_2_)
short
getShort(java.lang.String p_74765_1_)
java.lang.String
getString(java.lang.String p_74779_1_)
byte
getTagType(java.lang.String p_150299_1_)
INBTType<CompoundNBT>
getType()
java.util.UUID
getUUID(java.lang.String p_186857_1_)
protected static java.lang.String
handleEscape(java.lang.String p_193582_0_)
protected static ITextComponent
handleEscapePretty(java.lang.String p_197642_0_)
int
hashCode()
boolean
hasUUID(java.lang.String p_186855_1_)
boolean
isEmpty()
CompoundNBT
merge(CompoundNBT p_197643_1_)
INBT
put(java.lang.String p_218657_1_, INBT p_218657_2_)
void
putBoolean(java.lang.String p_74757_1_, boolean p_74757_2_)
void
putByte(java.lang.String p_74774_1_, byte p_74774_2_)
void
putByteArray(java.lang.String p_74773_1_, byte[] p_74773_2_)
void
putDouble(java.lang.String p_74780_1_, double p_74780_2_)
void
putFloat(java.lang.String p_74776_1_, float p_74776_2_)
void
putInt(java.lang.String p_74768_1_, int p_74768_2_)
void
putIntArray(java.lang.String p_74783_1_, int[] p_74783_2_)
void
putIntArray(java.lang.String p_197646_1_, java.util.List<java.lang.Integer> p_197646_2_)
void
putLong(java.lang.String p_74772_1_, long p_74772_2_)
void
putLongArray(java.lang.String p_197644_1_, long[] p_197644_2_)
void
putLongArray(java.lang.String p_202168_1_, java.util.List<java.lang.Long> p_202168_2_)
void
putShort(java.lang.String p_74777_1_, short p_74777_2_)
void
putString(java.lang.String p_74778_1_, java.lang.String p_74778_2_)
void
putUUID(java.lang.String p_186854_1_, java.util.UUID p_186854_2_)
private static INBT
readNamedTagData(INBTType<?> p_229680_0_, java.lang.String p_229680_1_, java.io.DataInput p_229680_2_, int p_229680_3_, NBTSizeTracker p_229680_4_)
private static java.lang.String
readNamedTagName(java.io.DataInput p_152448_0_, NBTSizeTracker p_152448_1_)
private static byte
readNamedTagType(java.io.DataInput p_152447_0_, NBTSizeTracker p_152447_1_)
void
remove(java.lang.String p_82580_1_)
int
size()
java.lang.String
toString()
void
write(java.io.DataOutput p_74734_1_)
private static void
writeNamedTag(java.lang.String p_150298_0_, INBT p_150298_1_, java.io.DataOutput p_150298_2_)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraft.nbt.INBT
getAsString, getPrettyDisplay
-
-
-
-
Field Detail
-
CODEC
public static final com.mojang.serialization.Codec<CompoundNBT> CODEC
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
SIMPLE_VALUE
private static final java.util.regex.Pattern SIMPLE_VALUE
-
TYPE
public static final INBTType<CompoundNBT> TYPE
-
tags
private final java.util.Map<java.lang.String,INBT> tags
-
-
Constructor Detail
-
CompoundNBT
protected CompoundNBT(java.util.Map<java.lang.String,INBT> p_i226075_1_)
-
CompoundNBT
public CompoundNBT()
-
-
Method Detail
-
write
public void write(java.io.DataOutput p_74734_1_) throws java.io.IOException
-
getAllKeys
public java.util.Set<java.lang.String> getAllKeys()
-
getType
public INBTType<CompoundNBT> getType()
-
size
public int size()
-
putByte
public void putByte(java.lang.String p_74774_1_, byte p_74774_2_)
-
putShort
public void putShort(java.lang.String p_74777_1_, short p_74777_2_)
-
putInt
public void putInt(java.lang.String p_74768_1_, int p_74768_2_)
-
putLong
public void putLong(java.lang.String p_74772_1_, long p_74772_2_)
-
putUUID
public void putUUID(java.lang.String p_186854_1_, java.util.UUID p_186854_2_)
-
getUUID
public java.util.UUID getUUID(java.lang.String p_186857_1_)
-
hasUUID
public boolean hasUUID(java.lang.String p_186855_1_)
-
putFloat
public void putFloat(java.lang.String p_74776_1_, float p_74776_2_)
-
putDouble
public void putDouble(java.lang.String p_74780_1_, double p_74780_2_)
-
putString
public void putString(java.lang.String p_74778_1_, java.lang.String p_74778_2_)
-
putByteArray
public void putByteArray(java.lang.String p_74773_1_, byte[] p_74773_2_)
-
putIntArray
public void putIntArray(java.lang.String p_74783_1_, int[] p_74783_2_)
-
putIntArray
public void putIntArray(java.lang.String p_197646_1_, java.util.List<java.lang.Integer> p_197646_2_)
-
putLongArray
public void putLongArray(java.lang.String p_197644_1_, long[] p_197644_2_)
-
putLongArray
public void putLongArray(java.lang.String p_202168_1_, java.util.List<java.lang.Long> p_202168_2_)
-
putBoolean
public void putBoolean(java.lang.String p_74757_1_, boolean p_74757_2_)
-
get
@Nullable public INBT get(java.lang.String p_74781_1_)
-
getTagType
public byte getTagType(java.lang.String p_150299_1_)
-
contains
public boolean contains(java.lang.String p_74764_1_)
-
contains
public boolean contains(java.lang.String p_150297_1_, int p_150297_2_)
-
getByte
public byte getByte(java.lang.String p_74771_1_)
-
getShort
public short getShort(java.lang.String p_74765_1_)
-
getInt
public int getInt(java.lang.String p_74762_1_)
-
getLong
public long getLong(java.lang.String p_74763_1_)
-
getFloat
public float getFloat(java.lang.String p_74760_1_)
-
getDouble
public double getDouble(java.lang.String p_74769_1_)
-
getString
public java.lang.String getString(java.lang.String p_74779_1_)
-
getByteArray
public byte[] getByteArray(java.lang.String p_74770_1_)
-
getIntArray
public int[] getIntArray(java.lang.String p_74759_1_)
-
getLongArray
public long[] getLongArray(java.lang.String p_197645_1_)
-
getCompound
public CompoundNBT getCompound(java.lang.String p_74775_1_)
-
getList
public ListNBT getList(java.lang.String p_150295_1_, int p_150295_2_)
-
getBoolean
public boolean getBoolean(java.lang.String p_74767_1_)
-
remove
public void remove(java.lang.String p_82580_1_)
-
toString
public java.lang.String toString()
-
isEmpty
public boolean isEmpty()
-
createReport
private CrashReport createReport(java.lang.String p_229677_1_, INBTType<?> p_229677_2_, java.lang.ClassCastException p_229677_3_)
-
copy
public CompoundNBT copy()
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
writeNamedTag
private static void writeNamedTag(java.lang.String p_150298_0_, INBT p_150298_1_, java.io.DataOutput p_150298_2_) throws java.io.IOException
- Throws:
java.io.IOException
-
readNamedTagType
private static byte readNamedTagType(java.io.DataInput p_152447_0_, NBTSizeTracker p_152447_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
readNamedTagName
private static java.lang.String readNamedTagName(java.io.DataInput p_152448_0_, NBTSizeTracker p_152448_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
readNamedTagData
private static INBT readNamedTagData(INBTType<?> p_229680_0_, java.lang.String p_229680_1_, java.io.DataInput p_229680_2_, int p_229680_3_, NBTSizeTracker p_229680_4_)
-
merge
public CompoundNBT merge(CompoundNBT p_197643_1_)
-
handleEscape
protected static java.lang.String handleEscape(java.lang.String p_193582_0_)
-
handleEscapePretty
protected static ITextComponent handleEscapePretty(java.lang.String p_197642_0_)
-
getPrettyDisplay
public ITextComponent getPrettyDisplay(java.lang.String p_199850_1_, int p_199850_2_)
- Specified by:
getPrettyDisplay
in interfaceINBT
-
entries
protected java.util.Map<java.lang.String,INBT> entries()
-
-