9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-25 18:09:27 +00:00

feat(block): 添加台灯

This commit is contained in:
jhqwqmc
2025-09-12 10:37:22 +08:00
parent d35afe9885
commit c285e6be78
3 changed files with 113 additions and 54 deletions

View File

@@ -739,6 +739,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