Skip to main content
This guide walks you through creating your first entity-based model with BetterModel.

Overview

Entity models are 3D models attached to Minecraft entities. They follow the entity’s position, rotation, and can respond to entity events like damage.

Prerequisites

1

Prepare Your Model

Create a BlockBench model and export it as .bbmodel format. Place it in BetterModel/models/ directory.
2

Add Plugin Dependency

Add BetterModel API to your build.gradle or pom.xml:

Basic Implementation

Creating an Entity Model

Here’s how to spawn a basic entity model:

Getting or Creating Models

Use getOrCreate() to avoid creating duplicate models:

Playing Animations

Basic Animation

Stop Animation

Updating Model Properties

Change Colors and Effects

Managing Model Lifecycle

Closing and Cleanup

Handle Close Events

Player Visibility Control

Best Practices

  • Always use getOrCreate() instead of create() to prevent duplicate trackers
  • Store tracker references in a map keyed by entity UUID for easy retrieval
  • Close trackers when entities are removed to prevent memory leaks
  • Use Optional to safely handle cases where models don’t exist
  • Creating multiple trackers for the same entity can cause visual glitches
  • Always check if a model exists before trying to create a tracker
  • Trackers are not automatically removed when entities die - handle cleanup manually

Complete Example

Next Steps

Animated NPC

Create interactive NPCs with custom animations

Custom Events

Learn about hitbox interactions and custom events

Conditional Animations

Implement state-based animation systems

API Reference

Explore the complete API documentation