Interface EnchantmentDefinition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The definition of a custom enchantment.
Experimental: these channels use Paper's bootstrap lifecycle and
RegistryEvents.ENCHANTMENT.
Paper 26.3 marks PluginBootstrap, LifecycleEvents.TAGS,
LifecycleEvents.DATAPACK_DISCOVERY and io.papermc.paper.registry.tag.Tag experimental.
A later 7.x release may adapt this interface to Paper changes; see COMPATIBILITY.md.- Since:
- 7.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefine(io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder builder, ComposeTags tags) Fills Paper's builder.
-
Method Details
-
define
void define(io.papermc.paper.registry.data.EnchantmentRegistryEntry.Builder builder, ComposeTags tags) Fills Paper's builder. Throwing marks the module as failed in its bootstrap phase.- Parameters:
builder- Paper's builder for this entrytags- resolves registry tags such as#minecraft:enchantable/swordfor supported items
-