Skip to content

Latest commit

 

History

History
81 lines (60 loc) · 2.09 KB

furniture-collisions.md

File metadata and controls

81 lines (60 loc) · 2.09 KB

🪨 Furniture collisions

How can I make a furniture solid?

You can make a furniture solid adding the "solid" attribute and specifying a hitbox (if you want > 1x1x1)

  table:
    display_name: display-name-table
    permission: table
    lore:
      - 'lore-decorative-item'
    resource:
      material: OAK_WOOD
      generate: false
      model_path: item/table
    behaviours:
      furniture:
        small: true
        solid: true
        entity: armor_stand
        hitbox:
          length: 1
          width: 1
          height: 1
          length_offset: 0
          width_offset: 0
          height_offset: 0

Hitbox has wrong location

{% hint style="warning" %} Sometimes you need to also specify an "offset" to fix the hitbox location.
This can happen if your furniture is 2x1x1 for example. {% endhint %}

Wrong hitbox location

Correct location

I had to set a width offset of 0.5.
You can also use negative values if needed.

        hitbox:
          length: 1
          width: 2
          height: 1
          width_offset: 0.5

Preview the hitbox

{% hint style="info" %} You can use the command /iahitbox to see the hitbox when you pleace a furniture, it's very useful to detect mistakes in the hitbox configuration {% endhint %}

{% hint style="warning" %} Hitboxes limitations

item_frame limitations (doesn't affect armor_stand)

Furnitures that use entity: item_frame support only hitbox with width and length of the same value.
Example: width: 2, length: 2, height: 1.


If you want to have different width and length use entity: armor_stand. {% endhint %}