Skip to content

Conversation

@wiflow
Copy link
Contributor

@wiflow wiflow commented Dec 27, 2025

Summary

  • Add optional BetterModel support for rendering custom BlockBench models on NPCs
  • New /npc model and /npc animate commands for model management
  • Model persistence and automatic spawning/despawning with visibility tracking
  • play_animation NPC action for triggering animations via interactions

Features

  • /npc model <npc> <model> - Apply or remove BetterModel models to NPCs
  • /npc model <npc> eyeheight <height> - Set custom eye height for turn-to-player functionality
  • /npc animate <npc> <animation> - Play model animations on NPCs
  • Model interaction bridging for click events on model hitboxes
  • Prevents incompatible commands (skin, type, scale, showInTab) on NPCs with models

Technical Changes

  • BetterModelHook - Runtime availability detection for BetterModel plugin
  • NpcModelController - EntityTracker lifecycle management
  • ModelInteractionBridge - Event handling for model interactions
  • Added getEntity() abstract method to Npc API for model attachment
  • Model data persistence in npcs.yml

Test plan

  • Install BetterModel and FancyNpcs on a test server
  • Create an NPC and apply a model with /npc model <npc> <model>
  • Verify model displays correctly and follows NPC visibility
  • Test /npc animate command with available animations
  • Verify turn-to-player works with custom eye height
  • Test model removal with /npc model <npc> @none
  • Verify model persistence after server restart
  • Test model interaction (clicking on model hitbox triggers NPC actions)
  • Confirm incompatible commands are blocked for model NPCs

Add optional BetterModel support for rendering custom BlockBench models on NPCs.

Features:
- /npc model <npc> <model> - Apply/remove BetterModel models to NPCs
- /npc model <npc> eyeheight <height> - Set custom eye height for turn-to-player
- /npc animate <npc> <animation> - Play model animations
- play_animation NPC action for triggering animations via interactions
- Model persistence in NPC data (npcs.yml)
- Automatic model spawning/despawning with NPC visibility tracking
- Model interaction bridging for click events on model hitboxes
- Prevent incompatible commands (skin, type, scale, showInTab) on model NPCs

Technical:
- BetterModelHook for runtime availability detection
- NpcModelController for EntityTracker lifecycle management
- ModelInteractionBridge for event handling
- getEntity() abstract method added to Npc API for model attachment
@NoltoxGit
Copy link

If you want to add compatibility with BettModel, please also add compatibility with ModelEngine. Thank you! 🙌

@wiflow wiflow marked this pull request as draft January 8, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants