9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

旋转家具配置

This commit is contained in:
XiaoMoMi
2025-12-05 04:09:45 +08:00
parent b310559c0d
commit 37eaf97dc4
25 changed files with 171 additions and 71 deletions

View File

@@ -11,6 +11,8 @@ items:
rotation: four
alignment: center
furniture:
events:
- template: default:rotatable_furniture_4
settings:
item: default:bench
sounds:

View File

@@ -31,6 +31,11 @@ items:
item-name: <!i><l10n:item.flower_basket>
furniture:
default:flower_basket:
events:
- template: default:rotatable_furniture_8
arguments:
blacklist_variants:
- wall
settings:
item: default:flower_basket
sounds:

View File

@@ -11,6 +11,8 @@ items:
rotation: any
alignment: any
furniture:
events:
- template: default:rotatable_furniture_8
settings:
item: default:wooden_chair
sounds:
@@ -27,25 +29,15 @@ items:
billboard: FIXED
translation: 0,0.5,0
hitboxes:
$$>=1.20.5:
- position: 0,0,0
type: custom
entity-type: slime
invisible: true
can-use-item-on: true
blocks-building: true
seats:
- 0,0,-0.1 0
$$fallback:
- position: 0,0,0
type: interaction
blocks-building: true
invisible: true
width: 0.7
height: 1.2
interactive: true
seats:
- 0,0,-0.1 0
- position: 0,0,0
type: interaction
blocks-building: true
invisible: true
width: 0.7
height: 1.2
interactive: true
seats:
- 0,0,-0.1 0
loot:
template: default:loot_table/furniture
arguments:

View File

@@ -16,7 +16,7 @@ templates:
east: south
south: west
west: north
default:rotatable_furniture:
default:rotatable_furniture_4:
on: right_click
conditions:
- type: expression
@@ -28,4 +28,45 @@ templates:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
on-failure: []
on-failure:
- type: rotate_furniture
degree: 180
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
on-failure:
- type: rotate_furniture
degree: 270
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
default:rotatable_furniture_8:
on: right_click
conditions:
- type: expression
expression: <arg:player.is_sneaking>
- type: "!match_furniture_variant"
variants: ${blacklist_variants:-null}
functions:
- type: rotate_furniture
degree: 45
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
on-failure:
- type: rotate_furniture
degree: 90
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}
on-failure:
- type: rotate_furniture
degree: 135
on-success:
- type: swing_hand
- type: play_sound
sound: ${rotate_sound:-'minecraft:block.bamboo.place'}