Model.yml File

model.yml file stores all the important details about models and parts.

Each model's folder must contain model.yml file.

File Example

model.yml
name: "Table" # Model name
author: "Steve" # Author of the model
version: "1.0" # Model version
type: static # Model type
description: "A stylish modern table."
properties:
  item:
    type: OAK_LOG 
  entity-collision-threshold: 0.5
  block-collision-threshold: 0.3 
parameters:
  bedColor:
    default: "RED"
    values: "%colors%"
    description: "Color of the bed (wool)"
parts:
  bed: 
    material: <bedColor>_WOOL 
    interaction: SIT
    value: none

Explanation of values

Main values

Each value is explained here, with in-depth information on how to use it.

name

This is model's name. It will only be used for cosmetic purposes, e.g. furniture item's name.

author

Model's author. Used for cosmetic purposes only.

version

Model's version. Used for cosmetic purposes only and keep a track of model versions.

type

Model type. Currently only one type of models is available: static

description

Description of model. Used for cosmetic purposes only, e.g. inside furniture item's lore.

Properties

Properties define model's placeable item and hitboxes.

item.type

Material used for model's placeable item. All materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html

sound.place

Sound for placing a model: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html

sound.break

Sound for breaking a model: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html

entity-collision-threshold

Entity Collision Threshold. Determines when to place invisible barrier blocks for entity collision. If the model occupies this percentage or more of a block's volume, a barrier is placed. Read Collision Informationfor more details and examples.

Value: range from 0.0 to 1.0, representing the volume overlap between a model and a block.

block-collision-threshold

Controls whether a model can be placed based on its overlap with existing blocks. If the model would occupy more than this percentage of any existing block, placement is prevented.

Value: range from 0.0 to 1.0, representing the volume overlap between a model and a block.

Parameters

Model parameters control variables for models, e.g. letting users define specific color for bed's wool color or wood frame. These are completely dynamic and can be created by anymore inside model.yml file.

Example of color parameter:

parameters:
  bedColor:
    default: "RED"
    values: "%colors%"
    description: "Color of the bed (wool)"

This would let you further into parts configuration use <bedColor> parameter, to define color for wool used with bed.

Explanation of each setting:

default

What value will model default to, if this parameter is not set when giving model.

values

format example: oak,birch,acacia

description

Used for info purposes, description of what this parameter does.

Parts

Configure part colors. This is the main functionality of the plugin. You are able to define here part looks and interactions.

parts: 
  bed_material: # Part name from model
    material: <bedColor>_WOOL 
  bed_frame: 
    material: DARK_OAK_LOG

bed here is an part's name from blockbench. Any parts from blockbench that use this name will utilize this material for their textures.

Combined with <bedColor> variable, you can create many possibilities for different looking models with same blockbench structure.

material

Material from Minecraft using Spigot material enums: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html

For model parts which need to be solid, you must use Materials which represent blocks, e.g. STONE or OAK_LOG. You are also able to use items, e.g. APPLE to create displayed items instead.

This is where you also utilize parameters, as in this case <bedColor> to customize placeable model.

interaction

A very powerful system, to create useful models. Here you can let player's sit on a model, or utilize the block as a furnace, storage and more.

Interaction can only be defined on a model once.

Which part has the interaction matters for `SIT` interaction, as player will be sat on that part. Any other interaction which opens a menu does not matter to which part it's assigned to.

Read more about interactions here: Model Interactions

value

Optional. Used for interactions which require additional details, e.g. COMMAND interaction.

Last updated