Skip to content

Model Definition Format (Resource Pack)

FoundationGames edited this page Feb 28, 2025 · 3 revisions

Location: "mypack:my_model" = assets/mypack/automobile_models/my_model.json

Model definitions describe an entity renderer that can be used for automobile parts, such as frames, wheels, or engines.

Example

{
    "type": "automobility:basic",
    "material": "cutout",
    "model_layer": "mypack:my_model_layer/main",
    "translation": [0, 0, 0],
    "rotation": [0, 0, 0],
    "scale": [1, 1, 1]
}

Definitions

  • type: What type of renderer to use for your model definition. Can be any one of:
    • automobility:basic: Renders the specified model with no animations
    • automobility:front_attachment: Renders the specified model attached rigidly to the frame, but the bone main.ground will be rendered touching the ground regardless of the vehicle's suspension if used for a front attachment.
    • automobility:harvester_front_attachment: Renders like automobility:front_attachment, with the bone main.ground.roller being animated to roll along with the wheels if used for a front attachment.
    • automobility:rear_attachment: Renders the specified model, with the bone main.wheels being animated to roll along with the vehicle's wheels if used for a rear attachment.
    • automobility:chest_rear_attachment: Renders like automobility:rear_attachment, with the bone main.lid being animated like a chest lid if used for an appropriate rear attachment.
    • automobility:grindstone_rear_attachment: Renders like automobility:rear_attachment, with the bone main.grindstone being animated to spin along with the vehicle's wheels.
    • automobility:stonecutter_rear_attachment: Renders like automobility:rear_attachment, with the bone main.stonecutter being animated to spin along with the vehicle's wheels, albeit at a faster speed.
    • automobility:plow_rear_attachment: Renders like automobility:rear_attachment, with the bones main.assembly and main.assembly.instrument being extended or retracted when deployed if used for an appropriate rear attachment.
    • automobility:banner_rear_attachment: Renders like automobility:rear_attachment, with the following bones rendered as such if used for an appropriate rear attachment:
      • main.fake_pole is only rendered as an item.
      • main.pole, main.pole.bar, are rendered only on the vehicle, and those two bones along with main.flag_pole, and main.flag_pole.flag_bar are bent at an angle based on the vehicle's speed.
      • main.flag_pole.flag_bar.flag is rendered as a banner, with banner patterns.
  • material: The render material to use for your model definition. Can be any one of:
    • solid: Renders fully opaque with no transparency or translucency.
    • cutout: Renders with clipped transparency. Fully transparent regions of the texture are transparent, and solid/translucent regions are opaque.
    • cutout_backfaces: Renders like cutout with visible backfaces (no backface culling).
    • translucent: Renders with full translucency support. May cause visual glitches based on translucency sorting, and may decrease performance when using fabulous graphics. Only use if you plan to use translucent (partially transparent) textures.
    • translucent_backfaces: Renders like translucent with visible backfaces (no backface culling).
    • additive_translucent: Renders translucency with additive blending, meaning that colors are brightened against geometry behind your model.
    • emissive: Renders like additive_translucent at full lighting, with no shading.
  • model_layer: The resource location of the entity model to use for this model.
    • EX: "mypack:my_model_layer/main" would be located at assets/mypack/models/entity/my_model_layer/main.json.
  • translation (OPTIONAL): The x, y, and z translation of your model in blocks.
  • rotation (OPTIONAL): The pitch, yaw, and roll rotation (specified in that order) of your model in degrees.
    • Applied in-game in the following order: yaw first, then pitch, then roll
  • scale (OPTIONAL): The x, y, and z scale of your model.

Clone this wiki locally