Minestom 26.1.2, animation/texture fixes, cleaner API + Blockbench features#73
Open
iam4722202468 wants to merge 6 commits into
Open
Minestom 26.1.2, animation/texture fixes, cleaner API + Blockbench features#73iam4722202468 wants to merge 6 commits into
iam4722202468 wants to merge 6 commits into
Conversation
- Bump Minestom to 2026.07.01-26.1.2 (from 1.21.11). - Add the junit-bom + junit-platform-launcher so the test task can actually run (it was missing the launcher, so no JUnit tests could execute). - Remove the dev.hollowcube:mql dependency (replaced by an in-house Molang evaluator). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
The dev.hollowcube:mql JIT reflectively calls ClassLoader.defineClass, which strong encapsulation blocks on Java 16+, so every Molang keyframe expression threw InaccessibleObjectException on the Java 25 target (unnoticed only because the bundled demos use literal keyframes). Molang.java is a small recursive-descent evaluator (arithmetic, comparisons, && || !, ternary, query./q. namespace, math.* in degrees; case-insensitive; unknown -> 0; parse errors degrade to 0). Compiled expressions are cached. MQLEvaluator/MQLData drop the lib annotations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
- Fix a translation bug: the animation offset was divided by 4 twice (frame provider + display), so position keyframes moved parts 1/4 as far as authored. - Rewrite Interpolator to real Blockbench step / linear / Catmull-Rom for all channels (was linear-only with a broken 2-point slerp); bezier approximates as a smooth spline; support discontinuous keyframes (pre/post data points). - Play Blockbench sound/particle/timeline effects (AnimationEffect + AnimationEffectHandler) with a default handler + setEffectHandler override. - Respect the loop flag: non-looping animations hold their last frame. - Animation blending: per-animation weight that ramps; playRepeat(name, blendTicks) crossfades in/out; per-bone transforms combine by weight. - Perf: dirty-check aside, memoize propagated + world rotation/scale per draw so the hot path stops re-walking the parent chain; fix a ~20x frame-cache over-alloc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
- Add ModelEntity: extend it instead of hand-wiring an invisible carrier entity. It owns the GenericModel and auto-syncs viewers + position + lifecycle, and is the hit "owner". - Replace custom ModelDamageEvent/ModelInteractEvent: hits on a model hitbox now surface as NORMAL Minestom EntityDamageEvent / PlayerEntityInteractEvent on the owner entity (GenericModel#getOwner). Removes both custom event classes. - Bone visibility: GenericModel#setBoneVisible / ModelBone#setVisible show/hide a bone at runtime. - Locators: GenericModel#getLocator returns a locator's world position (locators are now emitted as position-only bones instead of being dropped). - Minestom 26.1.2 API fixes (getViewers wildcard, sendPacketsToViewers, LazyPacket removal) + per-bone metadata dirty-check to stop re-sending unchanged transforms. - setNametag(bone, Component) creates a modern TextDisplay nametag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
- Sanitize/lower-case bone names where they become Minecraft ResourceLocations and on-disk model filenames, so models with uppercase/space bone names load on vanilla clients (issue #36 — was masked by Iris/Sodium). - Harden TextureGenerator's base64 decode (split at the data-URL comma instead of a fixed prefix; warn on non-embedded textures) (issue #65). - Emit Blockbench locators as cube-less position-only bones so they're queryable. - Guard null/missing keyframe fields so malformed models don't crash the pack build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
- GemGolemMob/BulbasaurMob use setOwner + normal Minestom hit events instead of the removed custom events. - Main.java: drop the removed setTimeRate call (Minestom 26.1.2 time API change). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsZs24bSHE9fCDzFbwyhuH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates WSEE to the latest Minestom, fixes real animation/texture bugs, cleans up the API, and adds several Blockbench features. Six logically-grouped commits; full build + 12 JUnit tests pass on Java 25.
Bug fixes
linearinterpolation actually worked.catmullrom/stepfell into a broken 2-point slerp; translation/scale ignored the mode entirely. Rewritten to real Blockbench step / linear / Catmull-Rom for all channels.dev.hollowcube:mqlJIT reflectively callsClassLoader.defineClass, blocked by strong encapsulation →InaccessibleObjectExceptionon the Java 25 target. Replaced with a small dependency-free Molang evaluator (case-insensitive,math.*in degrees,query.*, ternary, etc.).Minestom 26.1.2
Version bump + API fixes (
getViewerswildcard,sendPacketsToViewers,LazyPacketremoval, test-server time API). Also fixed the JUnit runner (was missingjunit-platform-launcher, so no tests could run).Cleaner API
ModelEntity— extend it instead of hand-wiring an invisible carrier entity; it owns the model and auto-syncs viewers + position + lifecycle.EntityDamageEvent/PlayerEntityInteractEventon the owner entity (GenericModel#getOwner).ModelDamageEventandModelInteractEventare removed.setNametag(bone, Component)creates a modernTextDisplaynametag.New Blockbench features
setEffectHandleroverride).playRepeat(name, blendTicks)crossfades animations by weight.setBoneVisible(name, boolean)for damage states / equipment / phases.getLocator(name)returns a locator's world position (previously dropped).Performance
Per-bone metadata dirty-check (only send when a transform changes), live viewer view (no per-tick copy), and per-draw memoization of propagated + world rotation/scale so the hot path stops re-walking the parent chain.
Honest caveats / not done
life_timethreading (approximated by anim_time), custom-handle bezier (approximated as Catmull-Rom), and timeline-effect default behavior.🤖 Generated with Claude Code