Oraxen
Search
K

Furniture Mechanic

How to add non cubic blocs to the game

Furniture Mechanic

Example furniture

Example configuration per item

table:
displayname: "<gray>Table"
material: DIAMOND
Pack:
generate_model: false
model: default/table
Mechanics:
furniture:
type: DISPLAY_ENTITY #Valid types are ITEM_FRAME, DISPLAY_ENTITY & GLOWING_ITEM_FRAME
block_sounds:
place_sound: block.stone.place
break_sound: block.stone.break
hit_sound: my.custom.hitsound # Custom sound as defined in Oraxen/sound.yml
step_sound: my.custom.stepsound # Requires a sound-file in the Oraxen/pack-folder aswell
fall_sound: my.custom.fallsound
barrier: true
drop:
silktouch: false
loots:
- { oraxen_item: table, probability: 1.0 }

Custom Sounds

Furniture, like custom blocks, can have custom sounds. Currently the options are place/break/hit/step/fall.
Mechanics:
furniture:
block_sounds:
place_sound: block.stone.place
break_sound: block.stone.break
hit_sound: my.custom.hitsound # Custom sound as defined in Oraxen/sound.yml
step_sound: my.custom.stepsound # Requires a sound-file in the Oraxen/pack-folder aswell
fall_sound: my.custom.fallsound
All the volume and pitch values are set to be what Minecraft uses for blocks normally. If you want to change the volume or pitch, you can do so by using the format below. Keep in mind these two formats are compatible with eachother. We recommend just use the default one, but the option is there if you want to change it.
Mechanics:
furniture:
block_sounds:
place:
sound: block.stone.place
volume: 1.0
pitch: 0.2
break_sound: block.stone.break
hit_sound: my.custom.hitsound # Custom sound as defined in Oraxen/sound.yml
step_sound: my.custom.stepsound # Requires a sound-file in the Oraxen/pack-folder aswell
fall_sound: my.custom.fallsound

Rotatable

To make a furniture rotatable, simply add the following to your item's config.
Mechanics:
furniture:
rotatable: true

ModelEngine Furniture

To make use of a ModelEngine model as your furniture, simply add the following to your item's config:
Mechanics:
furniture:
modelengine_id: name_of_your_bbmodel_file

Jukebox

Lets this furniture accept music discs and custom music discs which will be played. You can tweak the volume and pitch of the music from the jukebox. There is also a permission field, which can be used if you only want certain players to be able to play music from the jukebox. By default permission is blank, which means anyone can play music from the jukebox.
Mechanics:
furniture:
jukebox:
volume: 1.0
pitch: 1.0
permission: "oraxen.jukebox.play"

Barriers

Barriers are invisible blocks placed with your furniture so that it has a realistic hitbox. You can place a single one or a list relative to the position of the player who places them.

Single barrier:

Mechanics:
furniture:
barrier: true

Multiple barriers:

Mechanics:
furniture:
barriers:
- { x: 0, y: 0, z: 0 }
- { x: 0, y: 0, z: 1 }
- { x: 0, y: 0, z: 2 }
- { x: 1, y: 0, z: 0 }
- { x: 1, y: 0, z: 1 }
- { x: 1, y: 0, z: 2 }

Seats

Seats are only available when barriers are enabled. Currently it will also spawn a seat for every barrier, if there is multiple ones. You can alter the height-offset of seats with the following configuration:
Mechanics:
furniture:
seat: { height: 0.5 }
You can also adjust the rotation if desired by adding a yaw section. Keep in mind it is recommended to leave this off
Mechanics:
furniture:
seat: { height: -0.5, yaw: 90 }

Limited placing

You can customize what blocks a custom block/furniture can be placed on with limited_placing subsection. You can use the roof, floor and wall options to dictate where a block can be placed. By default, all are set to true. The type specifies if it should only be allowed on or denied on specific blocks. If type is ALLOW the block can only be placed on the given blocks. If the type is DENY can be placed on all blocks not matching the given blocks. There is also a radius_limitation option, which allows you to limit the amount of a certain furniture within a radius.
chair:
Mechanics:
furniture:
limited_placing:
radius_limitation:
radius: 20
amount: 10
roof: false
floor: true
wall: false
type: ALLOW
block_types:
- GRASS_BLOCK
- DIRT
block_tags:
- base_stone_nether
oraxen_blocks:
- chair
- ruby_ore
The block_tags can be found at this page. Useful if you want to allow/deny a group of blocks. The block_types are materials. Useful if you want to allow/deny a specific list block. The oraxen_blocks are blocks defined in the oraxen configuration. This allows all custom blocks and furniture in here, but furniture requires a barrier-hitbox.

Storage

This is a sub-mechanic for furniture and noteblock mechanics, that let you make a custom storage container. Essentially a chest, closet or whatever you might want.
There's a few different types: STORAGE, PERSONAL, ENDERCHEST & DISPOSAL. STORAGE is similar to a normal chest. Anyone can open it and view the content of it. PERSONAL is essentially a custom enderchest, letting you edit the row-count and so on. ENDERCHEST is literally just the enderchest inventory, but letting you make a custom block/furniture to access it. DISPOSAL is a custom trashcan, letting you throw items in it, and they will be deleted when closed.\
Mechanics:
furniture:
barrier: true
storage:
type: STORAGE
rows: 5 # Default: 6
title: "<red>My Storage" # Default: "Storage"
open_sound: entity.shulker.open # Default: entity.chest.open
close_sound: entity.shulker.close # Default: entity.chest.close
This mechanic requires a barrier(s) if used with furniture!

Light

You can configure your furniture so it produces light. To do so you need to install this plugin: LightAPI.
This allows you to use a new option: light. This option corresponds to light intensity and must be between 1 and 15.
Mechanics:
furniture:
barrier: true
light: 5
drop:
silktouch: false
loots:
- { oraxen_item: table, probability: 1.0 }

Video Tutorial