Skip to main content

Bettermodel Instance

An instance of a BetterModel entity

Fields

FieldTypeDefaultDescription
definitionRef<BetterModelDefinition>——
BetterModelDefinition (11)
FieldTypeDefaultDescription
displayNameVar<String>——
soundVar<Sound>EMPTY—
dataList<Ref<EntityData<*>>>empty—
modelIdVar<String>—The BetterModel model ID to use
namedVar<Boolean>falseWhether the entity should display a nametag
defaultAnimationSettingsDefaultAnimationSettings—Default animation settings for the entity
DefaultAnimationSettings (10)
FieldTypeDefaultDescription
walkAnimationBooleantrueRun the default walk animation if the entity is moving
idleVar<String>idleThe idle animation to play when the entity is not moving
walkVar<String>walkThe walk animation to play when the entity is moving
attackVar<String>attackThe attack animation to play when the entity swings its arm
hurtVar<String>hurtThe hurt animation to play when the entity takes damage
strafeVar<String>strafeThe strafe animation to play when the entity moves sideways
jumpVar<String>jumpThe jump animation to play when the entity leaves the ground
flyVar<String>flyThe flying animation to play when the entity is airborne
interactVar<String>interactThe interact animation to play when the entity is interacted with
hitboxYOffsetDouble-1.6Y offset applied to bone hitbox interaction entities (client-side positioning)
focusOffsetVector—Offset used as focus point for interaction bounds like look_at
headLightVar<Int>0Light level of a fake light block above the entity's head (0 disables)
hitboxesList<BoneHitbox>emptyList of custom hitboxes attached to bones
BoneHitbox (7)
FieldTypeDefaultDescription
boneNameString——
widthFloat0.5—
heightFloat0.5—
scaleFloat1.0—
offsetXDouble0.0—
offsetYDouble0.0—
offsetZDouble0.0—
nameOffsetDouble2.3Y offset for the name display above the entity. Use this to adjust the text display height.
showDisplayNameBooleantrueWhether to show the display name above the entity
spawnLocationVar<Position>ORIGIN—With rotation
dataList<Ref<EntityData<*>>>empty—
activityRef<out SharedEntityActivityEntry>——

How to use it​

Place the instance on a manifest page. definition is required; without it the log prints You must specify a definition and nothing is shown.

  • spawnLocation is the position (with rotation). If you use a dynamic value (a variable instead of a fixed position), the model is resolved per player.
  • data is applied on top of the definition's data, so an instance can override one bone or glow of its definition.
  • activity can be any shared or individual entity activity, for example a path from the road network. An individual activity makes each player see their own copy.