Перейти к основному содержимому

Bettermodel Definition

A BetterModel entity definition

Поля

ПолеТипПо умолчаниюОписание
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)
ПолеТипПо умолчаниюОписание
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)
ПолеТипПо умолчаниюОписание
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
Общие поля TypeWriter (displayName)
ПолеТипПо умолчаниюОписание
displayNameVar<String>——

How to use it​

  • modelId is the name of a model loaded by BetterModel. If it is not found the extension falls back to a model named steve, and logs a warning.
  • named shows displayName above the model as floating text, with the interaction indicator above it. nameOffset (default 2.3) is its height and showDisplayName can hide the name while keeping the indicator.
  • defaultAnimationSettings maps entity states to animation names: idle, walk (only used when walkAnimation is on), strafe, jump, fly, attack, hurt and interact. The interact animation plays when a player clicks the entity; leave it empty to play nothing.
  • focusOffset moves the point other systems look at (for example look-at), headLight adds a fake light block above the head (0 disables it), and hitboxes binds click boxes to bones.
  • data accepts the generic entity data entries plus the BetterModel ones. Vanilla data that has no equivalent on a 3D model (poses, mob variants…) is ignored with a one-time log warning.