DragonBody - DragonSurvivalTeam/DragonSurvival GitHub Wiki

Description

A dragon body represents the data for a dragon body type. It determines the visual look of the dragon (including the option for custom emotes, animations, and even models), as well as a few gameplay properties.

Location

Dragon bodies are part of the data pack directory structure, highlighted below:

 datapack name.zip
├──  pack.mcmeta
├──  data
    ├──  namespace
       ├──  dragonsurvival
          ├──  dragon_bodies
              ├──  <name>.json
  

Parents

This object is used by the following objects:

  1. DragonSpecies

Dependencies

The object references the following objects:

  1. Modifier
  2. DragonEmoteSet

MountingOffsets

An offset and scale to determine where to mount a player on this body type. The scale is multiplied by the bounding box extents of the dragon.

Schema

{
    "offset": [Vec3]        // [Optional] || The offset to apply to the rider (defaults to zero).
    "scale": [Vec3]         // [Optional] || The scaled offset (by the mount's bounding box) to apply to the rider (defaults to zero).
}

ScalingProportions

Values to determine how a dragon's hitbox is determined.

Schema

{
     "width": [number]       // [Mandatory] || The width of the hitbox.
     "height": [number]      // [Mandatory] || The height of the hitbox.
     "eye_height": [number]  // [Mandatory] || The eye height of the player.
     "offset": [number]      // [Mandatory] || The offset of the model from the hitbox opposite to the player's look direction. A value of 1 means to offset the model by a distance equal to its scale.
}

Schema

{
    "is_default": [boolean]                     // [Optional]  || Whether this body type will be added to dragon species that have no defined body types. Defaults to false.
    "modifiers": [Modifier]                     // [Mandatory] || List of modifiers to apply for this body type.
    "can_hide_wings": [bool]                    // [Optional]  || Whether this body type has hide-able wings. Defaults to true.
    "model": [ResourceLocation]                 // [Optional]  || The location of the custom model to use. Defaults to "geo/dragon_model.geo.json".
    "animation": [ResourceLocation]             // [Required]  || The location of the animation file to use.
    "bones_to_hide_for_toggle": [string]        // [Optional]  || The names of the bones to hide when toggling wings. Defaults to ["WingLeft", "WingRight, "SmallWingLeft", "SmallWingRight"]
    "emotes": [DragonEmoteSet]                  // [Mandatory] || The list of emotes for this dragon body type to use.
    "scaling_proportions": [ScalingProportions] // [Mandatory] || The proportions for the hitbox for this body type.
    "crouch_height_ratio": [number]             // [Mandatory] || The change in height when the dragon crouches.
    "mounting_offset": [MountingOffsets]        // [Optional]  || The offsets for players trying to mount this body type. If not specified, this body type cannot be mounted.
    "default_icon": [ResourceLocation]          // [Optional]  || The default icon to show for this dragon type, if any.
}
⚠️ **GitHub.com Fallback** ⚠️