-
-
Notifications
You must be signed in to change notification settings - Fork 3
NBT Format
Ethan edited this page Sep 17, 2021
·
2 revisions
NBT uses a byte to specify the TagType
, and a short
to specify the TagName
length, then the actual TagName
in bytes and then the actual payload data. NBT in Java Edition uses BigEndian and I'll be displaying bytes in hex.
Example: 0a
00 01
48
01
FF
00
0a
specifies it is TagCompound 00 01
is the length of the name (required even if the name is nothing just set it to 00 00
to set no length), 48
is a capital H in unicode, 01
indicates it is a ByteTag
, FF
is the payload which is -127 since all bits are set and 00
states that the compound tag has ended.
- 00 - TagEnd
- 01 - TagByte
- 02 - TagShort
- 03 - TagInt
- 04 - TagLong
- 05 - TagFloat
- 06 - TagDouble
- 07 - TagByteArray
- 08 - TagString
- 09 - TagList - any tags with no names
- 0A - TagCompound - any tags with names
- 0B - TagIntArray
- 0C - TagLongArray
This took me a while to do because there are so many tags. Tags in brackets are optional. TagByte with (bool) on the end simply means 1 = true and 0 = false
'root' (no name)
|_"minecraft:dimension_type" - TagCompound
|__"type"::"minecraft:dimension_type" - TagString
|__"value" - TagList of compounds
|__TagCompound (no name since it's inside of a list)
|__"name" - TagString
|__"id" - TagInt
|__"element" - TagCompound
|__"piglin_safe" - TagByte - Whether piglins shake and transform to zombified piglins (bool)
|__"natural" - TagByte - When false, compasses spin randomly. When true, nether portals can spawn zombified piglins (bool)
|__"ambient_light" - TagFloat - How much light the dimension has. 0.0 to 1.0
|__"fixed_time" - (TagLong) - If set, the time of the day is the specified value. If set, 0 to 24000
|__"infiniburn" - TagString - Resource location defining what block tag to use for infiniburn. "" or minecraft resource "minecraft:..."
|__"respawn_anchor_works" - TagByte - Whether players can charge and use respawn anchors (bool)
|__"has_skylight" - TagByte - Whether the dimension has skylight access or not (bool)
|__"bed_works" - TagByte - Whether players can use a bed to sleep (bool)
|__"effects" - TagString - Not known on wiki.vg yet but I'm guessing it has to do with particles - "minecraft:overworld", "minecraft:the_nether", "minecraft:the_end" or something else
|__"has_raids" TagByte Whether players with the Bad Omen effect can cause a raid (bool)
|__"min_y" - TagInt The minimum Y level
|__"height" - TagInt The maximum height
|__"logical_height" - TagInt The maximum height to which chorus fruits and nether portals can bring players within this dimension
|__"coordinate_scale" - TagFloat The multiplier applied to coordinates when traveling to the dimension 0.00001 - 30000000.0
|__"ultrawarm" - TagByte dimensions behave like the nether (water evaporates and sponges dry), causes lava to spread thinner (bool)
|__"has_ceiling" - TagByte Whether the dimension has a bedrock ceiling or not. When true, causes lava to spread faster (bool)
|__TagEnd
|__TagEnd
|__TagEnd
|__"minecraft:worldgen/biome" - TagCompound
|__"type"::"minecraft:worldgen/biome"
|__"value" - TagList of compounds
|__TagCompound (no name since it's inside of a list)
|__"name" - TagString e.g. "minecraft:plains"
|__"id" - TagInt - protocol ID of the biome (matches the index of the element in the registry list).
|__"element" - TagCompound
|__"precipitation" - TagString - The type of precipitation in the biome. "rain", "snow", or "none".
|__"depth" - TagFloat - The depth factor of the biome.
|__"temperature" - TagFloat - The temperature factor of the biome. The default values vary between 2.0 and -0.5.
|__"scale" - TagFloat - unknown currently
|__"downfall" - TagFloat - unknown, but my best guess is that it controls how much particles are shown to the client for downfall.
|__"category" - TagString - The category of the biome. Known values are "ocean", "plains", "desert", "forest", "extreme_hills", "taiga", "swamp", "river", "nether", "the_end", "icy", "mushroom", "beach", "jungle", "mesa", "savanna", and "none".
|__"temperature_modifier" - (TagString) - unknown
|__"effects" - TagCompound
|__"sky_color" TagInt The color of the sky. Example: 8364543, which is #7FA1FF in RGB.
|__"water_fog_color" - TagInt - The tint color when swimming. Example: 8364543, which is #7FA1FF in RGB.
|__"fog_color" - TagInt - The color of the fog effect when looking past the view distance. Example: 8364543, which is #7FA1FF in RGB.
|__"water_color" - TagInt - The tint color of the water blocks. Example: 8364543, which is #7FA1FF in RGB.
|__"foliage_color" (TagInt) - The tint color of the grass. Example: 8364543, which is #7FA1FF in RGB.
|__"grass_color" (TagInt) - unknown - Example: 8364543, which is #7FA1FF in RGB.
|__"grass_color_modifier" - (TagString) - Unknown, likely affects foliage color. If set, known values are "swamp" and "dark_forest".
|__"music" - (TagCompound) - Music properties for the biome.
|__"replace_current_music" (TagByte)
|__sound (TagString)
|__"max_delay" - (TagInt)
|__"min_delay" (TagInt)
|__(TagEnd)
|__"ambient_sound" - (TagString) - Ambient soundtrack. Example: "minecraft:ambient.basalt_deltas.loop".2
|__"additions_sound" - (TagCompound) Additional ambient sound that plays randomly
|__"sound" - (TagString)
|__"tick_chance" - (TagDouble)
|__(TagEnd)
|__"mood_sound" - (TagCompound) - Additional ambient sound that plays at an interval.
|__"sound" - (TagString)
|__"tick_delay" - (TagInt)
|__"offset" - (TagDouble)
|__"block_search_extent" - (TagInt)
|__(TagEnd)
|__TagEnd
|__"particles" - (TagCompound)
|__"probability" - (TagFloat) - Probability of spawning the particle.
|__"options" - (TagCompound) - The properties of the particle to spawn.
|__"type" - (TagString) - Identifies the particle type.
|__(TagEnd)
|__(TagEnd)
|__TagEnd
|__TagEnd
'TagEnd'