-
Notifications
You must be signed in to change notification settings - Fork 2
[1.21.1] Custom Data Components
Alberto Del Villano edited this page Jul 3, 2026
·
1 revision
InsaneLib registers a couple of its own Data Components, on top of the default overriding mechanism from Item Components. Both are persistent and networked, and can be added/removed on any item the same way as vanilla components (components/merge_components/remove_components in an item_components json).
| Component | Type | Info |
|---|---|---|
insanelib:knockback_multiplier |
Decimal (0–1) | Scales the knockback dealt by an item held in the main hand. |
insanelib:enchantability |
Integer | Overrides the item's enchantability at the enchanting table. |
The following example data/yournamespace/item_components/weak_sword.json halves the knockback dealt by wooden swords:
{
"item": "minecraft:wooden_sword",
"components": {
"insanelib:knockback_multiplier": 0.5
}
}The following example data/yournamespace/item_components/hard_to_enchant_sword.json makes wooden swords much harder to enchant well:
{
"item": "minecraft:wooden_sword",
"components": {
"insanelib:enchantability": 1
}
}