Package net.minecraft.nbt
Class NBTTagCompound
- java.lang.Object
-
- net.minecraft.nbt.NBTBase
-
- net.minecraft.nbt.NBTTagCompound
-
public class NBTTagCompound extends NBTBase
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.nbt.NBTBase
NBTBase.NBTPrimitive
-
-
Constructor Summary
Constructors Constructor Description NBTTagCompound()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NBTBase
copy()
+ Creates a clone of the tag.boolean
equals(java.lang.Object object)
boolean
getBoolean(java.lang.String key)
+ Retrieves a boolean value using the specified key, or false if no such key was stored.byte
getByte(java.lang.String key)
+ Retrieves a byte value using the specified key, or 0 if no such key was stored.byte[]
getByteArray(java.lang.String key)
+ Retrieves a byte array using the specified key, or a zero-length array if no such key was stored.NBTTagCompound
getCompoundTag(java.lang.String key)
+ Retrieves a NBTTagCompound subtag matching the specified key, or a new empty NBTTagCompound if no such key was stored.double
getDouble(java.lang.String key)
+ Retrieves a double value using the specified key, or 0 if no such key was stored.float
getFloat(java.lang.String key)
+ Retrieves a float value using the specified key, or 0 if no such key was stored.byte
getId()
+ Gets the type byte for the tag.int[]
getIntArray(java.lang.String key)
+ Retrieves an int array using the specified key, or a zero-length array if no such key was stored.int
getInteger(java.lang.String key)
+ Retrieves an integer value using the specified key, or 0 if no such key was stored.java.util.Set<java.lang.String>
getKeySet()
+ Gets a set with the names of the keys in the tag compound.long
getLong(java.lang.String key)
+ Retrieves a long value using the specified key, or 0 if no such key was stored.short
getShort(java.lang.String key)
+ Retrieves a short value using the specified key, or 0 if no such key was stored.java.lang.String
getString(java.lang.String key)
+ Retrieves a string value using the specified key, or an empty string if no such key was stored.NBTBase
getTag(java.lang.String key)
+ gets a generic tag with the specified namebyte
getTagId(java.lang.String key)
+ Gets the ID byte for the given tag keyNBTTagList
getTagList(java.lang.String key, int type)
+ Gets the NBTTagList object with the given name.int
hashCode()
boolean
hasKey(java.lang.String key)
+ Returns whether the given string has been previously stored as a key in the map.boolean
hasKey(java.lang.String key, int type)
+ Returns whether the given string has been previously stored as a key in the map.boolean
hasNoTags()
+ Return whether this compound has no tags.void
merge(NBTTagCompound other)
+ Merges this NBTTagCompound with the given compound.void
removeTag(java.lang.String key)
+ Remove the specified tag.void
setBoolean(java.lang.String key, boolean value)
+ Stores the given boolean value as a NBTTagByte, storing 1 for true and 0 for false, using the given string key.void
setByte(java.lang.String key, byte value)
+ Stores a new NBTTagByte with the given byte value into the map with the given string key.void
setByteArray(java.lang.String key, byte[] value)
+ Stores a new NBTTagByteArray with the given array as data into the map with the given string key.void
setDouble(java.lang.String key, double value)
+ Stores a new NBTTagDouble with the given double value into the map with the given string key.void
setFloat(java.lang.String key, float value)
+ Stores a new NBTTagFloat with the given float value into the map with the given string key.void
setIntArray(java.lang.String key, int[] value)
+ Stores a new NBTTagIntArray with the given array as data into the map with the given string key.void
setInteger(java.lang.String key, int value)
+ Stores a new NBTTagInt with the given integer value into the map with the given string key.void
setLong(java.lang.String key, long value)
+ Stores a new NBTTagLong with the given long value into the map with the given string key.void
setShort(java.lang.String key, short value)
+ Stores a new NBTTagShort with the given short value into the map with the given string key.void
setString(java.lang.String key, java.lang.String value)
+ Stores a new NBTTagString with the given string value into the map with the given string key.void
setTag(java.lang.String key, NBTBase value)
+ Stores the given tag into the map with the given string key.java.lang.String
toString()
-
Methods inherited from class net.minecraft.nbt.NBTBase
createNewByType, getString
-
-
-
-
Method Detail
-
getKeySet
public java.util.Set<java.lang.String> getKeySet()
+ Gets a set with the names of the keys in the tag compound.
-
setTag
public void setTag(java.lang.String key, NBTBase value)
+ Stores the given tag into the map with the given string key. This is mostly used to store tag lists.
-
setByte
public void setByte(java.lang.String key, byte value)
+ Stores a new NBTTagByte with the given byte value into the map with the given string key.
-
setShort
public void setShort(java.lang.String key, short value)
+ Stores a new NBTTagShort with the given short value into the map with the given string key.
-
setInteger
public void setInteger(java.lang.String key, int value)
+ Stores a new NBTTagInt with the given integer value into the map with the given string key.
-
setLong
public void setLong(java.lang.String key, long value)
+ Stores a new NBTTagLong with the given long value into the map with the given string key.
-
setFloat
public void setFloat(java.lang.String key, float value)
+ Stores a new NBTTagFloat with the given float value into the map with the given string key.
-
setDouble
public void setDouble(java.lang.String key, double value)
+ Stores a new NBTTagDouble with the given double value into the map with the given string key.
-
setString
public void setString(java.lang.String key, java.lang.String value)
+ Stores a new NBTTagString with the given string value into the map with the given string key.
-
setByteArray
public void setByteArray(java.lang.String key, byte[] value)
+ Stores a new NBTTagByteArray with the given array as data into the map with the given string key.
-
setIntArray
public void setIntArray(java.lang.String key, int[] value)
+ Stores a new NBTTagIntArray with the given array as data into the map with the given string key.
-
setBoolean
public void setBoolean(java.lang.String key, boolean value)
+ Stores the given boolean value as a NBTTagByte, storing 1 for true and 0 for false, using the given string key.
-
getTag
public NBTBase getTag(java.lang.String key)
+ gets a generic tag with the specified name
-
getTagId
public byte getTagId(java.lang.String key)
+ Gets the ID byte for the given tag key
-
hasKey
public boolean hasKey(java.lang.String key)
+ Returns whether the given string has been previously stored as a key in the map.
-
hasKey
public boolean hasKey(java.lang.String key, int type)
+ Returns whether the given string has been previously stored as a key in the map.
-
getByte
public byte getByte(java.lang.String key)
+ Retrieves a byte value using the specified key, or 0 if no such key was stored.
-
getShort
public short getShort(java.lang.String key)
+ Retrieves a short value using the specified key, or 0 if no such key was stored.
-
getInteger
public int getInteger(java.lang.String key)
+ Retrieves an integer value using the specified key, or 0 if no such key was stored.
-
getLong
public long getLong(java.lang.String key)
+ Retrieves a long value using the specified key, or 0 if no such key was stored.
-
getFloat
public float getFloat(java.lang.String key)
+ Retrieves a float value using the specified key, or 0 if no such key was stored.
-
getDouble
public double getDouble(java.lang.String key)
+ Retrieves a double value using the specified key, or 0 if no such key was stored.
-
getString
public java.lang.String getString(java.lang.String key)
+ Retrieves a string value using the specified key, or an empty string if no such key was stored.
-
getByteArray
public byte[] getByteArray(java.lang.String key)
+ Retrieves a byte array using the specified key, or a zero-length array if no such key was stored.
-
getIntArray
public int[] getIntArray(java.lang.String key)
+ Retrieves an int array using the specified key, or a zero-length array if no such key was stored.
-
getCompoundTag
public NBTTagCompound getCompoundTag(java.lang.String key)
+ Retrieves a NBTTagCompound subtag matching the specified key, or a new empty NBTTagCompound if no such key was stored.
-
getTagList
public NBTTagList getTagList(java.lang.String key, int type)
+ Gets the NBTTagList object with the given name. Args: name, NBTBase type
-
getBoolean
public boolean getBoolean(java.lang.String key)
+ Retrieves a boolean value using the specified key, or false if no such key was stored. This uses the getByte method.
-
removeTag
public void removeTag(java.lang.String key)
+ Remove the specified tag.
-
hasNoTags
public boolean hasNoTags()
+ Return whether this compound has no tags.
-
merge
public void merge(NBTTagCompound other)
+ Merges this NBTTagCompound with the given compound. Any sub-compounds are merged using the same methods, other types of tags are overwritten from the given compound.
-
-