Overview
BaseEntity is the primary entity adapter interface in BetterModel. It provides a unified way to access entity properties, manage custom models, and interact with the entity tracking system. This interface acts as a bridge between platform-specific entities and BetterModel’s internal entity management.
Package: kr.toxicity.model.api.entity
Extends: Identifiable
Factory Method
of()
BaseEntity adapter from a platform-specific entity.
Parameters:
entity- Platform entity to adapt
Core Methods
platform()
location()
handle()
id()
State Queries
dead()
true if dead
ground()
true if on ground
invisible()
true if invisible
glow()
true if glowing
onWalk()
true if walking
fly()
true if flying
Appearance Properties
customName()
null if none
scale()
Rotation Properties
pitch()
yaw()
bodyYaw()
headYaw()
Movement Properties
walkSpeed()
damageTick()
passengerPosition()
dest- Destination vector to write result
Equipment
mainHand()
offHand()
Tracking
trackedBy()
registry()
hasControllingPassenger()
true if has controlling passenger
Model Data
modelData()
null if none
modelData(String)
modelData- Model data key to set, ornullto clear
hasModelData()
true if model data is present
Usage Example
Related Types
- PlatformEntity - Platform abstraction layer
- PlatformLocation - Location representation
EntityTrackerRegistry- Entity tracker managementTransformedItemStack- Item stack wrapper
