Fandom

The Lord of the Rings Minecraft Mod Wiki

NBT-data

1,207pages on
this wiki
Add New Page
Comments45 Share
Piq 40275 400x400
This Article/Section is Marked for Review!

Content from Mevans post on this thread needs added, possibly as a subpage of this one.
After you fix this article, please remove this template.

Piq 40275 400x400

The NBT-format ("Named Binary Tags") is used in almost all minecraft save formats. This pages collects documentation for NBT-format changes and NBT-tags added by the LOTR-mod. For documentation to the vanilla NBT-tags see the official minecraft wiki.

Introduction to the NBT-formatEdit

The NBT-format is used to store minecraft worlds and with this, to store all blocks and entitys and the player itself. "Named Binary" means that NBT-tags consist of two things: a name and a value that belongs to the name. In addition, a NBT-tag has a data-type, following the java data-type that will be used to save this value. Each data-type has a specific range, the value must be in. For a full list of data types with descriptions, view the minecraft wiki page linked above.

Data Type Short form (as used on this page)
Byte [b]
Short [sh]
Int [int]
Long [l]
Float [fl]
Double [d]
String [str]
List [list]
Compound {}

Usage in the GameEdit

NBT-tags can be used in some commands to specify a item, mob, block or player. When a command accepts NBT-tags as argument, the argument must be in curly brackets:

/setblock ~ ~-1 ~ lotr:tile.hobbitOven 0 destroy {Items:[{Count:64,Slot:10,id:364}]}
This command will set a hobbit Oven below the command source (player) that will contain a stack of cooked steaks in the second "cooked"-slot. The items contained in the oven are written in the NBT-format.

Entity NBT-formatEdit

Entity data (vanilla)Edit

[str] id: Entity ID. For LOTR entitys, the id needs the "lotr." prefix
[list] Pos: 3 Doubles describing the current X,Y,Z position of the entity.
[d] x; [d] y; [d] z
[list] Motion: 3 Doubles describing the current dX,dY,dZ velocity of the entity in meters per tick.
[d] x; [d] y; [d] z
[list] Rotation: Two Floats representing viewing direction in degrees
[fl] The entity's rotation clockwise around the Y axis (called yaw). Due west is 0. Does not exceed 360 degrees. The StoneTroll entity uses this rotation value but not the other one.
[fl] The entity's declination from the horizon (called pitch). Horizontal is 0. Positive values look downward. Does not exceed positive or negative 90 degrees.
[fl] FallDistance: Distance the entity has fallen. Larger values cause more damage when the entity lands.
[sh] Fire: Number of ticks until the fire is put out. Negative values reflect how long the entity can stand in fire before burning. Default -1 when not on fire.
[sh] Air: How much air the entity has, in ticks. Fills to a maximum of 300 in air, giving 15 seconds submerged before the entity starts to drown, and a total of up to 35 seconds before the entity dies (if it has 20 health). Decreases while underwater. If 0 while underwater, the entity loses 1 health per second.
[b] OnGround: 1 or 0 (true/false) - true if the entity is touching the ground.
[int] Dimension: -1 for The Nether, 0 for The Overworld, 1 for The End, and 100 for Middle Earth
[b] Invulnerable: 1 or 0 (true/false) - true if the entity should not take damage. Mobs will not take damage from any source (including potion effects), and cannot be moved by fishing rods, attacks, explosions, or projectiles, and objects such as vehicles and wall banners cannot be destroyed unless their supports are removed.
[int] PortalCooldown: The number of ticks before which the entity may be teleported back through a portal of any kind. Initially starts at 900 ticks (45 seconds) after teleportation and counts down to 0.
[l] UUIDMost: The most significant bits of this entity's Universally Unique IDentifier. This is joined with UUIDLeast to form this entity's unique ID.
[l] UUIDLeast: The least significant bits of this entity's Universally Unique IDentifier.
[l] UUID: The Universally Unique IDentifier of this entity. Converts a hexadecimal UUID (for example: 069a79f4-44e9-4726-a5be-fca90e38aaf5) into the UUIDLeast and UUIDMost tags. Will not apply new UUIDLeast and UUIDMost tags if both of these tags are already present. The "UUID" tag is removed once the entity is loaded.
[str] CustomName: The custom name of this entity. Appears in player death messages and villager trading interfaces, as well as above the entity when your cursor is over it. May not exist, or may exist and be empty. Note that LOTR-NPCs have their own CustomName-tag, that overrides the vanilla CustomName.
[str] CustomNameVisible: 1 or 0 (true/false) - if true, and this entity has a custom name (or is an LOTR-NPC with an NPC name), it will always appear above them, whether or not the cursor is pointing at it. May not exist.
{} Riding: The data of the entity being ridden. Note that if an entity is being ridden, the topmost entity in the stack has the Pos tag, and the coordinates specify the location of the bottommost entity. Also note that the bottommost entity controls movement, while the topmost entity determines spawning conditions when created by a mob spawner.


Additional Fields for MobsEdit

[fl] HealF: Amount of health the entity has, in floating point format. A value of 1 is half a heart. Used when more precise health values are needed, such as the health of entities being damaged by a player with the Weakness effect (if the player isn't holding an item that increases their attack damage, they deal 1/2 a health point, 1/4 a heart). If this tag exists, Health will be ignored.
[sh] Health: Amount of health the entity has. Used when whole-number health values are needed, such as displaying a player's health on their HUD. If the HealF tag exists, this tag will be ignored.
[f] AbsorptionAmount: Amount of extra health added by Absorption effect.
[sh] AttackTime: Number of ticks the mob's "invincibility shield" lasts after the mob was last struck. 0 when not recently hit.
[sh] HurtTime: Number of ticks the mob turns red for after being hit. 0 when not recently hit.
[sh] DeathTime: Number of ticks the mob has been dead for. Controls death animations. 0 when alive.
[list] Attributes: A list of Attributes for this mob. These are used for many purposes in internal calculations, and can be considered a mob's "statistics". The LOTR-mod brings two new attributes: lotr.NPCAttackDamage and lotr.HorseAttackSpeed.
{} An individual Attribute.
[fl] Name: The name of this Attribute.
[d] Base: The base value of this Attribute.
[list] Modifiers: A list of Modifiers acting on this Attribute. Modifiers alter the Base value in internal calculations, without changing the original copy. Note that a Modifier will never modify Base to be higher than its maximum or lower than its minimum for a given Attribute.
{} An individual Modifier.
[fl] Name: The Modifier's name.
[d] Amount: The amount by which this Modifier modifies the Base value in calculations.
[int] Operation: 0, 1, or 2. Defines the operation this Modifier executes on the Attribute's Base value. 0: Increment X by Amount, 1: Increment Y by X * Amount, 2: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount). The game first sets X = Base, then executes all Operation 0 modifiers, then sets Y = X, then executes all Operation 1 modifiers, and finally executes all Operation 2 modifiers.
[l] UUIDMost: The most significant bits of this Modifier's Universally Unique IDentifier. Used to reference modifiers in memory and ensure duplicates are not applied.
[l] UUIDLeast: The least significant bits of this Modifier's Universally Unique IDentifier.
[list] ActiveEffects: The list of potion effects on this mob. May not exist.
{} A potion effect
[b] Id: The effect ID.
[b] Amplifier: The potion effect level. 0 is level 1.
[int] Duration: The number of ticks before the effect wears off.
[b] Ambient: 1 or 0 (true/false) - true if this effect is provided by a Beacon and therefore should be less intrusive on screen.
[b] ShowParticles: 1 or 0 (true/false) - true if particles are shown (affected by "Ambient"). false if no particles are shown.
[list] Equipment: The list of compound tags of the equipment the mob has. Each compound tag in the list is an Item without the slot tag. All 5 entries will always exist (even for players) but may be empty compound tags to indicate no item.
{} 0: The item being held in the mob's hand.
{} 1: Armor (Feet)
{} 2: Armor (Legs)
{} 3: Armor (Chest)
{} 4: Armor (Head)
[list] DropChances: List of float values from 0 to 1 representing the chance for a carried item to drop. By default these are all 0.085 (8.5%), but they get set to 2 if the mob picks up an item. Items with durability held by a mob that have an associated DropChances greater than 1.0 will retain the defined durability of the item. If the DropChances is 1.0 or lower, the durability is randomized. If the "Unbreakable" tag exists on the item, the durability will be assigned as defined, regardless of the DropChances value.
[fl] 0: Chance to drop the item being carried.
[fl] 1: Chance for the armor. (Feet)
[fl] 2: Chance for the armor. (Legs)
[fl] 3: Chance for the armor. (Chest)
[fl] 4: Chance for the armor. (Head)
[b] CanPickUpLoot: 1 or 0 (true/false) - true if the mob can pick up loot (wear armor it picks up, use weapons it picks up).
[b] PersistenceRequired: 1 or 0 (true/false) - true if the mob must not despawn naturally.
[b] Leashed: 1 or 0 (true/false) - whether the mob is leashed.
{} Leash: Either contains a UUID long pair, if this leash connects to another entity, or an X, Y, Z int trio if this leash connects to a fencepost.
[l] UUIDMost: The most significant bits of the Universally Unique IDentifier of the entity this leash connects to.
[l] UUIDLeast: The least significant bits of the Universally Unique IDentifier of the entity this leash connects to.
[int] X; [int] Y; [int] Z: The X, Y and Z coordinates of the fencepost this leash connects to.

New tags from the LOTR-modEdit

The Ring Portal (lotr.Portal) has this additional tag:

[int] Scale: When a Portal has been created, the ring starts small and grows until full size. This value determines, how far the ring already has grown. The maximum is 120.

All NPCs have these additional fields

[b] HurtOnlyByPlates: 1 or 0 (true/false) - Default true. Is set to false as soon as the NPC gets damage from anything other than thrown plates. This tag is used to determine if a player can get the achievement "Kitchen Brawler".
[b] NPCPassive: 1 or 0 (true/false) - When set to true, the Mob won't attack enemys on sight (if you would otherwise).
[b] NPCPersistent: 1 or 0 (true/false) - whether the Mob is bound to a structure and thus won't despawn. Equivalent to vanilla "PersistenceRequired".
[b] RidingHorse: 1 or 0 (true/false) - whether the Mob is riding a horse (not any other mount). Unknown effect.
[b] SpecificLocationName: 1 or 0 (true/false) - whether the Mob is bound to a structure.
[str] NPCLocationName: Name of the structure the Mob is bound to (Does only exist for named structures such as the Hobbit Tavern). The tag is used for certain speech lines.
[int] NPCHomeX; [int] NPCHomeY; [int] NPCHomeZ: Coordinates of the center of the structure, the Mob is bound to (only if it has a home). Is also used to determine the location to be guarded/farmed for recruited units in guard mode.
[int] NPCHomeRadius: Range to the structure center, in that the Mob is free to move while bound to a structure. Is also used to determine the guarding/farming range for hired units in guard mode. Set to -1 when the Mob is free to wander around (or has to follow his commander).
[int] NPCDrunkTime: The number of ticks that an NPC will remain drunk.
{} HiredPlayerInfo: This tag stores information about who is commanding the unit and which commands the unit have.
[b] CanMove: 1 or 0 (true/false) - when set to 0, the Mob won't be able to move unless being attacked. This tag only affects hired Mobs (IsActive:1)
[b] GuardMode: 1 or 0 (true/false) - whether the Mob has been commanded to guard a specific location instead of following the player.
[b] IsActive: 1 or 0 (true/false) - whether the Mob has been hired. When set to 0, all other HiredPlayerInfo-tags will have no effect
[b] ObeyHornHaltReady: 1 or 0 (true/false) - if set to 0, the Mob won't react to the Horn of Halt Units.
[b] ObeyHornSummon: 1 or 0 (true/false) - if set to 0, the Mob won't react to the Horn of Summon Units.
[b] TeleportAutomatically: 1 or 0 (true/false) - whether the Mob summons automatically to the commanding player, when he moves to far away (like tamed wolves).
[int] AlignmentRequired: The alignment required to have this Unit recruited. When the commanding player's alignment with the Mob's faction gets under this value, the Unit will desert.
[int] GuardRange: The range, that a unit may move away from the guarding center. While the unit is in GuardMode, this value will also get stored in "NPCHomeRadius". This tag is also used for the farming range of hireable farming units.
[int] MobKills: A statistic, how many enemys this unit already killed in its life. Has currently no effect on the game but is shown in the commanding screen.
[int] Task: Indicator, which special task the unit was given. Currently, the only special task a unit can have is farming (Task:1).
[str] HiringPlayerUUID: The unique player ID, that "owns" this unit. The UUID is a code that determines each player. (Example: cf4519e2-1d45-4762-bc38-605de9ed5a07)
[list] HiredInventory: The Inventory of a hired farming unit. It contains three slots (numbered 0-2), where the first one is the seeds slot and the later ones are the harvest slots.
{}: This is one inventory slot.

Any NPC with an inventory has a different system of determining Armour, Idle Items, Replaced Items, and more, which can be found here

Depending on their race, NPCs can also have these additional tags:

[str] NPCName: This is the name that is randomly generated for each NPC when he spawns. This name is mostly used when talking to the NPC. When a Dwarf-NPC has for example the name "Kili" then he is shown in the game as "Kili, the Dwarf" or "Kili, the Dwarven Warrior" (depending on his mob type).
[b] NPCMale: This tag only exists for races that have both genders (so for example not for Gondor) though in the future probably nearly all factions will get women. 1 means man and 0 means woman.
[unknown] NPCAge: This tag determines the NPC's age.

All item traders also have these additional tags:

{} LOTRBuyTrades: Contains a list of all avaiable item variants that the player can buy from the NPC.
[list]
{} One individual trade written in the Item format plus the Cost tag.
[int] Cost: The price (in silver coins) paid by the player for the determined items and the determined amount.
{} LOTRSellTrades: Contains a list of all avaiable item variants that the player can sell to the NPC.
[list]
{} One individual trade written in the Item format plus the Cost tag.
[int] Cost: The price (in silver coins) that the player gets when he sells the determined items in the determined amount.

Trolls (and StoneTrolls) have this additional tag:

[b] TrollOutfit: 0-2, determines the type of clothing the troll wears.

All types of wargs have this additional tag:

[b] WargType: 0-6, determines the type/color of the warg. Values 4-6 are used for the special Utumno wargs.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.