0.22 ➝ 0.23
Contexts
Contexts have been completely reworked to make them more flexible and reusable. Most notably, parameter types are now found on the intention object itself:
For custom parameter types and intentions, check out the updated contexts page.
Item- and block interactions
Item and block interactions no longer use WrappedPlayerInteractEvent (or any bukkit event). Interaction handling is now closer to vanilla behavior. This resolves several issues, like off-hand events only being fired sometimes. Interaction handling is now predictable and consistent. (Check out the flowcharts on the item behavior page)
- In
ItemBehavior, the methodshandleInteractandhandleEntityInteractwere replaced withuse,useOnBlock, anduseOnEntity. - Additionally,
modifyUseRemainderwas removed. Instead,handleUseFinishednow returns anItemAction(as used inInteractionResult.Success) that can be used to create the remaining item stack. - In
BlockBehavior,handleInteractwas replaced withuseanduseItemOn. Check out the updated item behavior and block behavior pages for a detailed overview of the new interaction system. - Block behaviors are no longer called when right-clicking a block while sneaking. This aligns with vanilla behavior.
Entity variants
WolfVariantBuilder: Texture functions (wild(),trame(), etc.) are now grouped for adult and baby model underadultTextures { }andbabyTextures { }blocksCatVariantBuilder,CowVariantBuilder,ChickenVariantBuilder,PigVariantBuilder:texturewas renamed toadulTextureandbabyTexturewas added.WolfSoundVariantBuilder: Like for the textures, sounds are now grouped underadultSounds { ... }andbabySounds { ... }blocks. Unlike textures, baby sounds default to adult sounds.stepSound()is now available.
Notable dependency updates
The following dependencies were updated and include breaking changes:
- Minecraft: Updated from
1.21.11to26.1.1 - InvUI: Updated from
2.0.0-alpha.26to2.0.0-RC.2 - commons-provider: Updated from
2.0.0-alpha.8to2.0.0-alpha.10