mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-06 15:52:03 +00:00
为沙发添加旋转配置
This commit is contained in:
@@ -53,6 +53,8 @@ items:
|
||||
behavior:
|
||||
type: block_item
|
||||
block:
|
||||
events:
|
||||
- template: default:rotatable_block
|
||||
loot:
|
||||
template: default:loot_table/self
|
||||
settings:
|
||||
|
||||
@@ -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: []
|
||||
Reference in New Issue
Block a user