-
Notifications
You must be signed in to change notification settings - Fork 4
EnchantmentModule
the enchantment module implements besides a few custom effects also some other systems.
allows to implement effects when blocks are broken. override #onBreak
allows to implement effects when arrows are shot in order to store state / modify properties of the arrow. also allows to implement tick behavior and hit behavior
special type of post attack effect. allows to apply effect only every X hits or the first X hits.

applies different info of the enchantment. this includes whether the item is a
treasure enchantment and can therefore not be obtained from the enchantment table
and if the item is a villager tradable enchantment. furthermore a selected list of
items the enchantment can be applied to is displayed. you can register your own
item display info via RegisterEnchantmentApplicableCharsEvent and calling either
the register method, giving it an item and resolving the texture to be used as
<namespace>:textures/item/<item_id> or the overload which allows for the
texture to be declared separately. (can be individually disabled in the config)
changes the color of the enchantment display. accepts different configurations depending on
- level
- category (curse, ultimate)
- specific enchantment
of the enchantment to colourise.
you get to the enchantment color configurator with
/cec:
if you wish to distribute your configuration, you can find the stored JSON data of the
enchantments within ./kap_lib/enchantment_colors_config.json where the root project
is the game profile directory.
enchantment descriptions can be added as translation keys using the title
translation with .desc appended. for multi-line descriptions append an index
starting with 1 to all appended tooltip lines.
wind charge example:
