Item modification
This page is still under construction! Please yell at ChiefArug for publishing it too early.
Item modification is a startup event.
ItemEvents.modification is a startup script event used to modify various properties of existing items.
ItemEvents.modification(event => {
event.modify('minecraft:ender_pearl', item => {
item.maxStackSize = 64
item.fireResistant = true
item.rarity = "UNCOMMON"
})
event.modify('minecraft:ancient_debris', item => {
item.rarity = "RARE"
item.fireResistant = false
item.burnTime = 16000
})
event.modify('minecraft:turtle_helmet', item => {
item.rarity = "EPIC"
item.maxDamage = 481
item.craftingRemainder = Item.of('minecraft:scute').item
})
})
Available properties:
| Property | Value |
Description |
null to remove food properties.
foodProperties
Consumer<FoodBuilder>
Sets the properties according to the consumer. See example below //TODO ADD LINK
digSpeed
float
Sets the items digging speed to the number provided. See table below for defaults.
tier
Consumer<MutableToolTier>
Sets the items tier according to the consumer. See example below //TODO ADD LINK
attackDamage
double
Adds an attack damage bonus. If this is a tool-type item then you should modify the tier instead. Can be negative.
attackSpeed
double
Adds an attack speed bonus. If this is a tool-type item then you should modify the tier instead. Can be negative.
armorProtection
double
Adds an armor protection bonus. Can be negative.
armorToughness
double
Adds an armor toughness bonus. Can be negative.
armorKnockbackResistance
double
Add an armor knockback resistance bonus. Can be negative. 1 is full knockback resistance.
Tool defaults
| Tier | maxDamage | digSpeed | attackDamage (this is a bonus, not the final value) |
Wood
59 2 0 Stone 131 4 1 Iron 250 6 2 Diamond 1561 8 3 Gold 32 12 0 Netherite 2031 9 4Armor defaults
All boxes with multiple values are formatted [head, chest, legs, feet]. Boxes with single values are the same for every piece.
| Tier |
maxDamage |
armourProtection |
armorToughness | armorKnockbackResistance |
[1, 4, 5, 2]
0
0
Iron
[195, 225, 240, 165]
[2, 5, 6, 2]
0
0
Gold
[91 ,105, 112, 77]
[1, 3, 5, 2]
0
0
Diamond
[429, 495, 528, 363]
[3, 6, 8, 3]
2
0
Turtle (only has helmet)
[325, nil, nil. nil]
[2, nil, nil, nil]
0
0
Netherite
[481, 555, 592, 407]
[3, 6, 8, 3]
3
0.1
Elytra (not actually armor)
[nil, 432, nil, nil]
0
0
0
Tier
Options for modifying tiers