The Lord of the Rings Minecraft Mod Wiki
Advertisement
Piq 40275 400x400
This Article/Section is Marked for Review!

This article needs to be edited to comply with our wiki's standards.
Please fix its grammar and/or add more content.
After you fix this article, please remove this template.

Piq 40275 400x400


The NBT data format is used to save gameplay for entities, players, and tile entities. This page documents the tags that the LOTR mod uses and adds for entities and also summarises the vanilla tags for entities. The basic idea behind the NBT format and how the LOTR mod uses it can be found here. This page uses the same data-type abbreviations and formats as the mentioned page. The example tags can be used in the /summon and the /lotr_summon commands.

Entity NBT-format[]

Entity data (vanilla)[]

[str] id: Entity ID. For LOTR entities, 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 Mobs[]

[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-mod[]

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 enemies 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.
{} HiredNPCInfo: 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 too far away (like tamed wolves).
[F] AlignReqF: 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 enemies this unit already killed in its life. Has currently no effect on the game but is shown in the commanding screen. Note: Mob kills grant experience, but they are not directly connected with one another.
[int] Xp: The total amount of experience the unit has. This determines when the unit should level up.
[int] XpLvl: The amount of experience levels the unit has.
[int] Task: Indicator, which special task the unit was given. Currently, the only special task a unit can have is farming (Task:1)
[str] Squadron: The squadron this unit is part of.
[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", 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.
[int] NPCAge: This tag determines the NPC's age.

All item traders also have these additional tags:

{} LOTRBuyTrades: Contains a list of all available item variants that the player can buy from the NPC.
[list] Trades: List containing trades.
{} 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.
[int] LockedTicks: The amount of ticks the trade will be locked for.
[int] RecentTradeValue: Adds 100 for each item traded. Counts down by 1 every second(?).
{} LOTRSellTrades: Contains a list of all avaiable item variants that the player can sell to the NPC.
[list] Trades: List containing trades.
{} 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.
[int] LockedTicks: The amount of ticks the trade will be locked for.
[int] RecentTradeValue: Adds 100 for each item traded. Counts down by 1 every second(?).

Trolls (and StoneTrolls) have this additional tag:

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

List of tags for mounts:

[b] BelongsNPC: 1 or 0 (true/false) The tag for the mount to allow the unit to control the mount.

[b] Mountable: 1 or 0 (true/false) Allows the mount to be mounted

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.

Mirkwood Spiders have this additional tag:

[b] SpiderType: 0-2, this determines the type of the spider. Any value above this will result in invisible spiders.

Spiders have this additional tag:

[b] SpiderScale: 0-2, this determines the size of the spider.

Advertisement