📍 Furniture Placement

Introduction

Furniture supports three placement modes: ground, ceiling, and wall. You can employ distinct appearances and collision box schemes for different placement modes. For instance, a potted plant furniture item may stand upright when placed on the ground, dangle with a rope when hung from the ceiling, and be supported by a wooden plank when mounted on the wall—much like vanilla bell block.

You can configure multiple placement modes simultaneously for a single piece of furniture.

Below, I will use the ground mode as an example to explain how to configure a basic placement.

furniture:
  default:bench:
    placement:
      ground:
        rules:
          # ANY / FOUR / EIGHT / SIXTEEN / NORTH / EAST / WEST / SOUTH
          rotation: EIGHT
          # ANY / CENTER / HALF / QUARTER / CORNER
          alignment: CENTER
        elements:
          - item: default:bench
            display-transform: NONE
            billboard: FIXED
            position: 0.5,0,0
            translation: 0,0.5,0
        hitboxes:
          - position: 0,0,0
            width: 1
            height: 1
            interactive: true
            seats:
              - 0,0,-0.1 0
          - position: 1,0,0
            width: 1
            height: 1
            interactive: true
            seats:
              - 1,0,-0.1 0

There are three sections: rules, elements, and hitboxes.

The rules section determines the position and rotation constraints of the furniture after placement. The elements section defines which items compose the furniture (you can configure multiple items for a single piece of furniture, each with different display modes). The hitboxes section specifies the collision volume of the furniture.

Rules

rotation

The plugin's furniture supports a variety of rotation schemes, with the differences between them lying in the limitations on the number of rotation angles or the direct specification of rotation directions.

Rotation has no effect on wall-mounted placement methods.

alignment

Alignment is also applicable to wall-mounted placements.

Elements

An element is each item that constitutes the appearance of the furniture. For most furniture, a single item suffices. However, if you wish to create a more intricate piece of furniture, you can assemble it from multiple items. For example, a holographic projection could be divided into two items: a base and the projection itself. The base could have a fixed orientation, while the projection could be set to always face the player.

elements:
  - item: default:bench
    display-transform: NONE # NONE / THIRD_PERSON_LEFT_HAND / THIRD_PERSON_RIGHT_HAND
                            # FIRST_PERSON_LEFT_HAND / FIRST_PERSON_RIGHT_HAND
                            # HEAD / GUI / GROUND / FIXED
    billboard: FIXED  # FIXED / VERTICAL / HORIZONTAL / CENTER
    position: 0.5,0,0
    translation: 0,0.5,0
    scale: 1,1,1

Please note the distinction between position and translation. position alters the coordinate location of the corresponding display entity, whereas translation is a displacement attribute of the display entity itself.

For furniture placed on walls, you need to use position for slight offsets; otherwise, the furniture may turn black in certain directions. This is related to how Minecraft renders entities.

Hitboxes

The hitbox is the interaction entity sent to the player, and you can visualize its effect by using the F3+B debug screen.

hitboxes:
  - position: 0,0,0
    width: 1
    height: 1
    interactive: true
    seats:
      - 0,0,-0.1 0
  - position: 1,0,0
    width: 1
    height: 1
    interactive: true
    seats:
      - 1,0,-0.1 0

A single hitbox can be configured with multiple seats. If the seats of multiple hitboxes are positioned at the same location, it is equivalent to having only one seat.

The position of a seat is determined by a location and a rotation, separated by a space in the configuration.

0,0,0 0

You may also choose not to configure a rotation angle, allowing players to rotate freely to any angle while seated.

0,0,0

Last updated