Skip to content

๐Ÿšช Door Mechanic

Nexo lets you make a furniture that will act as a door.
You can also specify a few extra options for additional behaviour:

toggle_hitbox_on_open - Changes the hitbox from barriers to interactions when opened
open_sound - The sound to play when opening the door
close_sound - The sound to play when closing the door
open_properties - The same as Furniture Properties, but only applied in open-state
is_sliding - If the door is sliding type or normal type
automatic_close_delay - A duration of time before the door will close when opened (1t, 2s, 3m, etc...)
delay_hitbox_toggle - If the swap to non-solid hitbox should be delayed until door is fully opened

There is also a new delay-property which defines the "time to open" for the door.
If left unspecified, the door immediatly changes state

There is also two types of doors, normal and sliding. A sliding door opens by applying the open_properties transformations, whilst a normal door applies a rotation

Config Examples:

large_wooden_door:
  itemname: Large Wooden Door
  Pack:
    model: nexo:item/nexo_furniture/large_wooden_door
  Mechanics:
    furniture:
      limited_placing:
        floor: true
      hitbox:
        barriers: 0..1,0..2,0
      block_sounds:
        place_sound: block.wood.place
        break_sound: block.wood.break
      properties:
        translation: 0,1,0
        delay: 4t
      door:
        open_sound: block.wooden_door.open
        close_sound: block.wooden_door.close
        toggle_hitbox_on_open: true
        open_properties:
          translation: -0.85,1,0
large_wooden_sliding_door:
  itemname: Large Wooden Sliding Door
  Pack:
    model: nexo:item/nexo_furniture/large_wooden_door
  Mechanics:
    furniture:
      limited_placing:
        floor: true
      hitbox:
        barriers: 0..1,0..2,0
      block_sounds:
        place_sound: block.wood.place
        break_sound: block.wood.break
      properties:
        translation: 0,1,0
        delay: 4t
      door:
        is_sliding: true
        open_sound: block.wooden_door.open
        close_sound: block.wooden_door.close
        toggle_hitbox_on_open: true
        open_properties:
          translation: -1.5,1,0