Item Creation (Staff)

Item Creation (Attributes)

Item attributes make any item within a "worn" slot function with specific mechanics, when assigning custom attributes to an item you must take into account that when new attributes are assigned all base attribute values are wiped. This meaning that when you assign a custom speed attribute to a pair of boots the armor and armor toughness values are wiped leaving the armor piece to no longer offer any protection.

Whenever you assign attribute items with base values you will have to reassign them and most of them are straight forward with a few exceptions. Attack speed values are the most cumbersome due to how Minecraft displays them and how item attributes are added to items. The problem being that assigning a + integer will not replicate the original items attack speed values so be careful not to fall for this mistake.

Another easy mistake to make is calculating damage for items, when assigning damage values you have to remember that the item is essentially adding attributes to your fist or slot. So when assigning damage values remember that the item inherently has the base attack value of 1 because punching deals 1 damage. Example: If you want an item to deal a total of 14 damage via attributes you will assign a +13 value to attack damage.

When you have assigned attack damage values to an item you must also remember that Sharpness no longer can effect the item. Due to the nature of Attributes, the enchantment for sharpness no longer properly functions when a value has been assigned, however smite and bane of arthropods still function just fine. If you wish to make an item that replicates sharpness values simply add an additional .5 damage for each level of sharpness you wish to replicate.

Base Values Table for Re-Adding Damage

Generalized Base Values Table for Re-Adding Attack Speed

Base Values Table for Re-Adding Armor Values

Attribute Listing

Max Health Effects total health of the player depending on the method you use for the value (whether addition, scalar, or simply multiplication) on the item you're using. Max health effects any item so long as the player has the item on a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot and is capped by Minecraft's cap for health at 1024.

Follow Range Effects the range in blocks at which mobs will follow the player, or other mobs they normally target, based on the method you use for the value. So long as the player has the item on a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Knockback Resistance Effects the scale of horizontal knockback resisted from attacks and projectiles. (Vertical knockback is not affected and does not affect explosions.) 1.0 = 100% meaning that .4 will cause 60% of knockback to be applied to the player when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Note there is a large difference between adding +1 and setting the scalar or multiplication value to 1.0. Using the add function of +1 does not completely reduce knockback resistance and functions like netherite armor values.

Movement Speed Effects the maximum speed of the player's or mob's maximum speed but, is still effected by conditions such as sprinting, fleeing (passive mob), attacking, led by leash, under the effects of a speed or slowness potion effect.) The attribute functions when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Movement speed is very quick to add up so be very careful when using it on an item, beware using the addition or scalar values with movement speed unless you're 100% certain with how you're treating values. Multiplication is a good way to go for about 99% of cases.

Attack Damage Effects the overall damage the player or mob can cause when within a "worn slot" when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Armor Effects the percentage of damage a player or mob takes, each point of armor is equivalent to 4% damage reduction when within a "worn slot" when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Something to note here is that no matter how high an armor value it will be reduced in calculations by the strength of the attack hitting the player or mob, so if an attack is strong enough the effects of armor can be nearly reduced to nothing. Armor can only be reduced down to .8% of it's total value in standard situations so always keep this in mind.

When without armor toughness you can assume that for every point of damage dealt 2% of the armor has reduced for the calculations of how much the individual takes in damage.

Armor Toughness Effects the percentage of which damage can reduce armor in the calculations for damage taken meaning that the higher your total value of armor toughness the harder it becomes to hit through an individuals armor and deal damage. This value should never be allowed to be too high as it can quickly ramp up to silly amounts of resistance overall to damage.

Example: The armor toughness from diamond (which if wearing a whole set) is 8 which reduces armor penetration from 2% per point of damage to 1%.

Attack Speed Effects the recharge rate of attack strength (swing timers) and the standard value presented is attacks per second when within a "worn slot" when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

The standard value presented represented the number of full damage swings that can happen within a second. An easy example being that if the vanilla value is shown as four than you potentially can manage four full powered swings within a second with the item.

Luck Effects loot tables based on the formula floor(weight + (quality × generic.luck))* when within a "worn slot" when the value is assigned to an item within a "worn slot" (head, chest, legs, feet, hand, or offhand) the attribute can take affect unless the attribute is specified for a specific worn slot.

Jump Strength Effects the jump strength of mounts when an item with the attribute is placed within a mount's "worn slot."

Flying Speed Effects the fly speed of bees and parrots when an item with the attribute is placed within the mob's "worn slot."

Spawn Reinforcement Effects the chance for zombie reinforcements to be spawned when a zombie is attack when an item with the attribute is placed within the mob's "worn slot."

Attribute Modifiers

A modifier's operation dictates how it modifies an attribute's base value. Three operations exist:

Add (amount +/-): Saved as operation 0. Adds all of the modifiers' amounts to the current value of the attribute. For example, modifying an attribute with {Amount:2,Operation:0} and {Amount:4,Operation:0} with a Base of 3 results in 9 (3 + 2 + 4 = 9).

Multiply Base (amount % +/-, additive): Saved as operation 1. Multiplies the current value of the attribute by (1 + x), where x is the sum of the modifiers' amounts. For example, modifying an attribute with {Amount:2,Operation:1} and {Amount:4,Operation:1} with a Base of 3 results in 21 (3 * (1 + 2 + 4) = 21).

Multiply (amount % +/-, multiplicative): Saved as operation 2. For every modifier, multiplies the current value of the attribute by (1 + x), where x is the amount of the particular modifier. Functions the same as Operation 1 if there is only a single modifier with operation 1 or 2. However, for multiple modifiers it multiplies the modifiers rather than adding them. For example, modifying an attribute with {Amount:2,Operation:2} and {Amount:4,Operation:2} with a Base of 3 results in 45 (3 * (1 + 2) * (1 + 4) = 45).

Maths for Modifiers

Add: Increment X by Amount

Multiply Base: Increment Y by X * Amount

Multiply: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount).