9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-06 15:52:03 +00:00

为沙发添加旋转配置

This commit is contained in:
XiaoMoMi
2025-12-05 01:19:59 +08:00
parent 97f45c81eb
commit df24a4047d
15 changed files with 257 additions and 32 deletions

View File

@@ -53,6 +53,8 @@ items:
behavior:
type: block_item
block:
events:
- template: default:rotatable_block
loot:
template: default:loot_table/self
settings:

View File

@@ -0,0 +1,31 @@
templates:
default:rotatable_block:
on: right_click
conditions:
- type: expression
expression: <arg:player.is_sneaking>
functions:
- type: update_interaction_tick
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
- type: swing_hand
- type: cycle_block_property
property: facing
rules:
north: east
east: south
south: west
west: north
default:rotatable_furniture:
on: right_click
conditions:
- type: expression
expression: <arg:player.is_sneaking>
functions:
- type: rotate_furniture
degree: 90
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
on-failure: []