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

Merge pull request #370 from jhqwqmc/dev

feat(block): 添加台灯
This commit is contained in:
XiaoMoMi
2025-09-12 20:36:58 +08:00
committed by GitHub
9 changed files with 149 additions and 67 deletions

View File

@@ -28,8 +28,8 @@ lang:
block_name:default:copper_coil: Copper Coil
block_name:default:chessboard_block: Chessboard Block
block_name:default:safe_block: Safe Block
block_name:default:sleeper_sofa: Sofa
block_name:default:sofa: Sofa
block_name:default:connectable_sofa: Sofa
zh_cn:
block_name:default:chinese_lantern: 灯笼
block_name:default:netherite_anvil: 下界合金砧
@@ -56,5 +56,5 @@ lang:
block_name:default:copper_coil: 铜线圈
block_name:default:chessboard_block: 棋盘方块
block_name:default:safe_block: 保险柜
block_name:default:sofa: 沙发
block_name:default:connectable_sofa: 沙发
block_name:default:sleeper_sofa: 沙发
block_name:default:sofa: 沙发

View File

@@ -69,7 +69,6 @@ items#misc:
overrides:
tags:
- minecraft:mineable/pickaxe
- minecraft:anvil
sounds:
break: minecraft:block.anvil.break
step: minecraft:block.anvil.step
@@ -587,10 +586,10 @@ items#misc:
step: minecraft:block.wood.step
tags:
- minecraft:mineable/axe
behavior:
type: bouncing_block
bounce-height: 0.66
sync-player-position: false
behaviors:
- type: bouncing_block
bounce-height: 0.66
sync-player-position: false
state:
id: 0
state: white_bed[facing=west,occupied=false,part=foot]
@@ -739,6 +738,116 @@ items#misc:
facing=west,shape=straight:
appearance: facing=west,shape=straight
id: 11
default:table_lamp:
material: nether_brick
custom-model-data: 3011
data:
item-name: <!i><i18n:item.table_lamp>
model:
type: minecraft:model
path: minecraft:item/custom/table_lamp
behavior:
type: block_item
block:
loot:
template: default:loot_table/self
settings:
template:
- default:sound/metal
overrides:
hardness: 1
resistance: 1
replaceable: false
is-redstone-conductor: false
is-suffocating: false
behaviors:
- type: toggleable_lamp_block
can-open-with-hand: true
- type: sturdy_base_block
direction: down
support-types:
- full
- center
states:
properties:
lit:
type: boolean
default: false
facing:
type: 4-direction
default: north
appearances:
east_off:
state: barrier
entity-renderer:
item: default:table_lamp
north_off:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: -90
south_off:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: 90
west_off:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: 180
east_on:
state: barrier
entity-renderer:
item: default:table_lamp
north_on:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: -90
south_on:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: 90
west_on:
state: barrier
entity-renderer:
item: default:table_lamp
yaw: 180
variants:
facing=east,lit=false:
appearance: east_off
id: 12
facing=north,lit=false:
appearance: north_off
id: 13
facing=south,lit=false:
appearance: south_off
id: 14
facing=west,lit=false:
appearance: west_off
id: 15
facing=east,lit=true:
appearance: east_on
id: 16
settings:
luminance: 15
facing=north,lit=true:
appearance: north_on
id: 17
settings:
luminance: 15
facing=south,lit=true:
appearance: south_on
id: 18
settings:
luminance: 15
facing=west,lit=true:
appearance: west_on
id: 19
settings:
luminance: 15
recipes#misc:
default:chinese_lantern:
type: shaped

View File

@@ -52,10 +52,9 @@ categories:
default:furniture:
name: <!i><#FFD700><i18n:category.furniture></#FFD700>
hidden: true
icon: default:table_lamp
icon: default:flower_basket
list:
- default:bench
- default:table_lamp
- default:wooden_chair
- default:flower_basket
default:misc:
@@ -83,4 +82,5 @@ categories:
- default:sleeper_sofa
- minecraft:air
- minecraft:air
- default:sofa
- default:sofa
- default:table_lamp

View File

@@ -42,57 +42,6 @@ items:
template: default:loot_table/furniture
arguments:
item: default:bench
default:table_lamp:
material: nether_brick
custom-model-data: 2001
data:
item-name: <!i><i18n:item.table_lamp>
model:
type: minecraft:model
path: minecraft:item/custom/table_lamp
behavior:
type: furniture_item
furniture:
settings:
item: default:table_lamp
sounds:
break: minecraft:block.lantern.break
place: minecraft:block.lantern.place
placement:
ground:
loot-spawn-offset: 0,0.2,0
rules:
rotation: ANY
alignment: QUARTER
elements:
- item: default:table_lamp
display-transform: NONE
billboard: FIXED
translation: 0,0.5,0
rotation: 90
hitboxes:
- position: 0,0,0
type: interaction
blocks-building: true
width: 0.7
height: 0.1
interactive: true
- position: 0,0.1,-0.1
type: interaction
blocks-building: true
width: 0.1
height: 0.6
interactive: true
- position: 0,0.6,0.15
type: interaction
blocks-building: true
width: 0.4
height: 0.4
interactive: true
loot:
template: default:loot_table/furniture
arguments:
item: default:table_lamp
default:wooden_chair:
material: nether_brick
custom-model-data: 2002