9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-26 02:19:23 +00:00

feat(block): 添加默认示例

This commit is contained in:
jhqwqmc
2025-06-20 12:14:50 +08:00
parent 03b0aea4c3
commit f25b7ed813
10 changed files with 297 additions and 2 deletions

View File

@@ -63,4 +63,5 @@ minecraft:oxidized_copper_door: 32
minecraft:waxed_copper_door: 32
minecraft:waxed_exposed_copper_door: 32
minecraft:waxed_weathered_copper_door: 32
minecraft:waxed_oxidized_copper_door: 32
minecraft:waxed_oxidized_copper_door: 32
minecraft:oak_fence_gate: 16

View File

@@ -3723,6 +3723,24 @@ minecraft:iron_door[facing=west,half=upper,hinge=right,open=true,powered=true]:
# minecraft:pale_oak_door[facing=west,half=upper,hinge=left,open=true,powered=true]: minecraft:pale_oak_door[facing=west,half=upper,hinge=left,open=true,powered=false]
# minecraft:pale_oak_door[facing=west,half=upper,hinge=right,open=true,powered=true]: minecraft:pale_oak_door[facing=west,half=upper,hinge=right,open=true,powered=false]
#### Fence Gate ####
minecraft:oak_fence_gate[facing=east,in_wall=false,open=false,powered=true]: minecraft:oak_fence_gate[facing=east,in_wall=false,open=false,powered=false]
minecraft:oak_fence_gate[facing=east,in_wall=false,open=true,powered=true]: minecraft:oak_fence_gate[facing=east,in_wall=false,open=true,powered=false]
minecraft:oak_fence_gate[facing=east,in_wall=true,open=false,powered=true]: minecraft:oak_fence_gate[facing=east,in_wall=true,open=false,powered=false]
minecraft:oak_fence_gate[facing=east,in_wall=true,open=true,powered=true]: minecraft:oak_fence_gate[facing=east,in_wall=true,open=true,powered=false]
minecraft:oak_fence_gate[facing=south,in_wall=false,open=false,powered=true]: minecraft:oak_fence_gate[facing=south,in_wall=false,open=false,powered=false]
minecraft:oak_fence_gate[facing=south,in_wall=false,open=true,powered=true]: minecraft:oak_fence_gate[facing=south,in_wall=false,open=true,powered=false]
minecraft:oak_fence_gate[facing=south,in_wall=true,open=false,powered=true]: minecraft:oak_fence_gate[facing=south,in_wall=true,open=false,powered=false]
minecraft:oak_fence_gate[facing=south,in_wall=true,open=true,powered=true]: minecraft:oak_fence_gate[facing=south,in_wall=true,open=true,powered=false]
minecraft:oak_fence_gate[facing=west,in_wall=false,open=false,powered=true]: minecraft:oak_fence_gate[facing=west,in_wall=false,open=false,powered=false]
minecraft:oak_fence_gate[facing=west,in_wall=false,open=true,powered=true]: minecraft:oak_fence_gate[facing=west,in_wall=false,open=true,powered=false]
minecraft:oak_fence_gate[facing=west,in_wall=true,open=false,powered=true]: minecraft:oak_fence_gate[facing=west,in_wall=true,open=false,powered=false]
minecraft:oak_fence_gate[facing=west,in_wall=true,open=true,powered=true]: minecraft:oak_fence_gate[facing=west,in_wall=true,open=true,powered=false]
minecraft:oak_fence_gate[facing=north,in_wall=false,open=false,powered=true]: minecraft:oak_fence_gate[facing=north,in_wall=false,open=false,powered=false]
minecraft:oak_fence_gate[facing=north,in_wall=false,open=true,powered=true]: minecraft:oak_fence_gate[facing=north,in_wall=false,open=true,powered=false]
minecraft:oak_fence_gate[facing=north,in_wall=true,open=false,powered=true]: minecraft:oak_fence_gate[facing=north,in_wall=true,open=false,powered=false]
minecraft:oak_fence_gate[facing=north,in_wall=true,open=true,powered=true]: minecraft:oak_fence_gate[facing=north,in_wall=true,open=true,powered=false]
#### Chorus Plant ####
# Chorus Plant does support transparent textures, but man... its hitbox is super weird. You're probably better off using leaves.
# minecraft:chorus_plant[down=false,east=false,north=false,south=false,up=false,west=false]: minecraft:chorus_plant[down=true,east=true,north=true,south=true,up=true,west=true]

View File

@@ -16,6 +16,7 @@ lang:
block_name:default:palm_leaves: Palm Leaves
block_name:default:palm_trapdoor: Palm Trapdoor
block_name:default:palm_door: Palm Door
block_name:default:palm_fence_gate: Palm Fence Gate
block_name:default:fairy_flower: Fairy Flower
block_name:default:reed: Reed
block_name:default:flame_cane: Flame Cane
@@ -37,6 +38,7 @@ lang:
block_name:default:palm_leaves: 棕榈树叶
block_name:default:palm_trapdoor: 棕榈木活板门
block_name:default:palm_door: 棕榈木门
block_name:default:palm_fence_gate: 棕榈木栅门
block_name:default:fairy_flower: 仙灵花
block_name:default:reed: 芦苇
block_name:default:flame_cane: 烈焰甘蔗

View File

@@ -24,6 +24,7 @@ categories:
- default:palm_planks
- default:palm_trapdoor
- default:palm_door
- default:palm_fence_gate
default:topaz:
name: <!i><#FF8C00><i18n:category.topaz></#FF8C00>
hidden: true

View File

@@ -33,6 +33,7 @@ i18n:
item.palm_leaves: Palm Leaves
item.palm_trapdoor: Palm Trapdoor
item.palm_door: Palm Door
item.palm_fence_gate: Palm Fence Gate
item.netherite_anvil: Netherite Anvil
item.gunpowder_block: GunPowder Block
item.solid_gunpowder_block: Solid GunPowder Block
@@ -82,6 +83,7 @@ i18n:
item.palm_leaves: 棕榈树叶
item.palm_trapdoor: 棕榈木活板门
item.palm_door: 棕榈木门
item.palm_fence_gate: 棕榈木栅栏门
item.netherite_anvil: 下界合金砧
item.gunpowder_block: 火药粉末
item.solid_gunpowder_block: 凝固火药块

View File

@@ -421,6 +421,61 @@ items:
textures:
bottom: minecraft:block/custom/palm_door_bottom
top: minecraft:block/custom/palm_door_top
default:palm_fence_gate:
material: nether_brick
custom-model-data: 1008
data:
item-name: <!i><i18n:item.palm_fence_gate>
model:
type: minecraft:model
path: minecraft:item/custom/palm_fence_gate
generation:
parent: minecraft:block/custom/palm_fence_gate
behavior:
type: block_item
block:
behaviors:
type: fence_gate_block
can-open-with-hand: true
can-open-by-wind-charge: true
sounds:
open: block.fence_gate.open
close: block.fence_gate.close
loot:
template: default:loot_table/self
settings:
item: default:palm_fence_gate
sounds:
break: minecraft:block.wood.break
step: minecraft:block.wood.step
place: minecraft:block.wood.place
hit: minecraft:block.wood.hit
fall: minecraft:block.wood.fall
tags:
- minecraft:fence_gates
- minecraft:mineable/axe
- minecraft:unstable_bottom_center
states:
template: default:block_state/fence_gate
arguments:
base_block: oak_fence_gate
model_fence_gate_path: minecraft:block/custom/palm_fence_gate
model_fence_gate_generation:
parent: minecraft:block/template_fence_gate
textures: &textures
texture: minecraft:block/custom/palm_fence_gate
model_fence_gate_open_path: minecraft:block/custom/palm_fence_gate_open
model_fence_gate_open_generation:
parent: minecraft:block/template_fence_gate_open
textures: *textures
model_fence_gate_wall_path: minecraft:block/custom/palm_fence_gate_wall
model_fence_gate_wall_generation:
parent: minecraft:block/template_fence_gate_wall
textures: *textures
model_fence_gate_wall_open_path: minecraft:block/custom/palm_fence_gate_wall_open
model_fence_gate_wall_open_generation:
parent: minecraft:block/template_fence_gate_wall_open
textures: *textures
recipes:
default:palm_planks:
template: default:recipe/planks

View File

@@ -1831,6 +1831,214 @@ templates#block_states:
facing=west,half=upper,hinge=right,open=true,powered=false:
appearance: facing=west,half=upper,hinge=right,open=true
id: 63
# fence gate block
default:block_state/fence_gate:
properties:
facing:
type: horizontal_direction
in_wall:
type: boolean
default: false
open:
type: boolean
default: false
powered:
type: boolean
default: false
appearances:
facing=east,in_wall=false,open=false:
state: ${base_block}[facing=east,in_wall=false,open=false,powered=true]
model:
path: ${model_fence_gate_path}
y: 270
uvlock: true
generation: ${model_fence_gate_generation}
facing=east,in_wall=false,open=true:
state: ${base_block}[facing=east,in_wall=false,open=true,powered=true]
model:
path: ${model_fence_gate_open_path}
y: 270
uvlock: true
generation: ${model_fence_gate_open_generation}
facing=east,in_wall=true,open=false:
state: ${base_block}[facing=east,in_wall=true,open=false,powered=true]
model:
path: ${model_fence_gate_wall_path}
y: 270
uvlock: true
generation: ${model_fence_gate_wall_generation}
facing=east,in_wall=true,open=true:
state: ${base_block}[facing=east,in_wall=true,open=true,powered=true]
model:
path: ${model_fence_gate_wall_open_path}
y: 270
uvlock: true
generation: ${model_fence_gate_wall_open_generation}
facing=north,in_wall=false,open=false:
state: ${base_block}[facing=north,in_wall=false,open=false,powered=true]
model:
path: ${model_fence_gate_path}
y: 180
uvlock: true
facing=north,in_wall=false,open=true:
state: ${base_block}[facing=north,in_wall=false,open=true,powered=true]
model:
path: ${model_fence_gate_open_path}
y: 180
uvlock: true
facing=north,in_wall=true,open=false:
state: ${base_block}[facing=north,in_wall=true,open=false,powered=true]
model:
path: ${model_fence_gate_wall_path}
y: 180
uvlock: true
facing=north,in_wall=true,open=true:
state: ${base_block}[facing=north,in_wall=true,open=true,powered=true]
model:
path: ${model_fence_gate_wall_open_path}
y: 180
uvlock: true
facing=south,in_wall=false,open=false:
state: ${base_block}[facing=south,in_wall=false,open=false,powered=true]
model:
path: ${model_fence_gate_path}
uvlock: true
facing=south,in_wall=false,open=true:
state: ${base_block}[facing=south,in_wall=false,open=true,powered=true]
model:
path: ${model_fence_gate_open_path}
uvlock: true
facing=south,in_wall=true,open=false:
state: ${base_block}[facing=south,in_wall=true,open=false,powered=true]
model:
path: ${model_fence_gate_wall_path}
uvlock: true
facing=south,in_wall=true,open=true:
state: ${base_block}[facing=south,in_wall=true,open=true,powered=true]
model:
path: ${model_fence_gate_wall_open_path}
uvlock: true
facing=west,in_wall=false,open=false:
state: ${base_block}[facing=west,in_wall=false,open=false,powered=true]
model:
path: ${model_fence_gate_path}
y: 90
uvlock: true
facing=west,in_wall=false,open=true:
state: ${base_block}[facing=west,in_wall=false,open=true,powered=true]
model:
path: ${model_fence_gate_open_path}
y: 90
uvlock: true
facing=west,in_wall=true,open=false:
state: ${base_block}[facing=west,in_wall=true,open=false,powered=true]
model:
path: ${model_fence_gate_wall_path}
y: 90
uvlock: true
facing=west,in_wall=true,open=true:
state: ${base_block}[facing=west,in_wall=true,open=true,powered=true]
model:
path: ${model_fence_gate_wall_open_path}
y: 90
uvlock: true
variants:
facing=east,in_wall=false,open=false,powered=true:
appearance: facing=east,in_wall=false,open=false
id: 0
facing=east,in_wall=false,open=false,powered=false:
appearance: facing=east,in_wall=false,open=false
id: 1
facing=east,in_wall=false,open=true,powered=true:
appearance: facing=east,in_wall=false,open=true
id: 2
facing=east,in_wall=false,open=true,powered=false:
appearance: facing=east,in_wall=false,open=true
id: 3
facing=east,in_wall=true,open=false,powered=true:
appearance: facing=east,in_wall=true,open=false
id: 4
facing=east,in_wall=true,open=false,powered=false:
appearance: facing=east,in_wall=true,open=false
id: 5
facing=east,in_wall=true,open=true,powered=true:
appearance: facing=east,in_wall=true,open=true
id: 6
facing=east,in_wall=true,open=true,powered=false:
appearance: facing=east,in_wall=true,open=true
id: 7
facing=south,in_wall=false,open=false,powered=true:
appearance: facing=south,in_wall=false,open=false
id: 8
facing=south,in_wall=false,open=false,powered=false:
appearance: facing=south,in_wall=false,open=false
id: 9
facing=south,in_wall=false,open=true,powered=true:
appearance: facing=south,in_wall=false,open=true
id: 10
facing=south,in_wall=false,open=true,powered=false:
appearance: facing=south,in_wall=false,open=true
id: 11
facing=south,in_wall=true,open=false,powered=true:
appearance: facing=south,in_wall=true,open=false
id: 12
facing=south,in_wall=true,open=false,powered=false:
appearance: facing=south,in_wall=true,open=false
id: 13
facing=south,in_wall=true,open=true,powered=true:
appearance: facing=south,in_wall=true,open=true
id: 14
facing=south,in_wall=true,open=true,powered=false:
appearance: facing=south,in_wall=true,open=true
id: 15
facing=west,in_wall=false,open=false,powered=true:
appearance: facing=west,in_wall=false,open=false
id: 16
facing=west,in_wall=false,open=false,powered=false:
appearance: facing=west,in_wall=false,open=false
id: 17
facing=west,in_wall=false,open=true,powered=true:
appearance: facing=west,in_wall=false,open=true
id: 18
facing=west,in_wall=false,open=true,powered=false:
appearance: facing=west,in_wall=false,open=true
id: 19
facing=west,in_wall=true,open=false,powered=true:
appearance: facing=west,in_wall=true,open=false
id: 20
facing=west,in_wall=true,open=false,powered=false:
appearance: facing=west,in_wall=true,open=false
id: 21
facing=west,in_wall=true,open=true,powered=true:
appearance: facing=west,in_wall=true,open=true
id: 22
facing=west,in_wall=true,open=true,powered=false:
appearance: facing=west,in_wall=true,open=true
id: 23
facing=north,in_wall=false,open=false,powered=true:
appearance: facing=north,in_wall=false,open=false
id: 24
facing=north,in_wall=false,open=false,powered=false:
appearance: facing=north,in_wall=false,open=false
id: 25
facing=north,in_wall=false,open=true,powered=true:
appearance: facing=north,in_wall=false,open=true
id: 26
facing=north,in_wall=false,open=true,powered=false:
appearance: facing=north,in_wall=false,open=true
id: 27
facing=north,in_wall=true,open=false,powered=true:
appearance: facing=north,in_wall=true,open=false
id: 28
facing=north,in_wall=true,open=false,powered=false:
appearance: facing=north,in_wall=true,open=false
id: 29
facing=north,in_wall=true,open=true,powered=true:
appearance: facing=north,in_wall=true,open=true
id: 30
facing=north,in_wall=true,open=true,powered=false:
appearance: facing=north,in_wall=true,open=true
id: 31
# recipes
templates#recipes:

View File

@@ -258,6 +258,10 @@ warning.config.block.behavior.trapdoor.missing_open: "<yellow>Issue found in fil
warning.config.block.behavior.trapdoor.missing_powered: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'powered' property for 'trapdoor_block' behavior.</yellow>"
warning.config.block.behavior.stackable.missing_amount: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'amount' property for 'stackable_block' behavior.</yellow>"
warning.config.block.behavior.stackable.missing_items: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'items' argument for 'stackable_block' behavior.</yellow>"
warning.config.block.behavior.fence_gate.missing_facing: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'facing' argument for 'fence_gate' behavior.</yellow>"
warning.config.block.behavior.fence_gate.missing_in_wall: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'in_wall' argument for 'fence_gate' behavior.</yellow>"
warning.config.block.behavior.fence_gate.missing_open: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'powered' argument for 'fence_gate' behavior.</yellow>"
warning.config.block.behavior.fence_gate.missing_powered: "<yellow>Issue found in file <arg:0> - The block '<arg:1>' is missing the required 'open' argument for 'fence_gate' behavior.</yellow>"
warning.config.model.generation.missing_parent: "<yellow>Issue found in file <arg:0> - The config '<arg:1>' is missing the required 'parent' argument in 'generation' section.</yellow>"
warning.config.model.generation.invalid_display_position: "<yellow>Issue found in file <arg:0> - The config '<arg:1>' is using an invalid display position '<arg:2>' in 'generation.display' section. Allowed display positions: [<arg:3>]</yellow>"
warning.config.model.generation.invalid_gui_light: "<yellow>Issue found in file <arg:0> - The config '<arg:1>' is using an invalid gui-light option '<arg:2>' in 'generation' section. Allowed gui light options: [<arg:3>]</yellow>"

View File

@@ -258,6 +258,10 @@ warning.config.block.behavior.trapdoor.missing_open: "<yellow>在文件 <arg:0>
warning.config.block.behavior.trapdoor.missing_powered: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'trapdoor_block' 行为缺少必需的 'powered' 属性</yellow>"
warning.config.block.behavior.stackable.missing_amount: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'stackable_block' 行为缺少必需的 'amount' 属性</yellow>"
warning.config.block.behavior.stackable.missing_items: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'stackable_block' 行为缺少必需的 'items' 参数</yellow>"
warning.config.block.behavior.fence_gate.missing_facing: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'fence_gate' 行为缺少必需的 'facing' 属性</yellow>"
warning.config.block.behavior.fence_gate.missing_in_wall: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'fence_gate' 行为缺少必需的 'in_wall' 属性</yellow>"
warning.config.block.behavior.fence_gate.missing_open: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'fence_gate' 行为缺少必需的 'open' 属性</yellow>"
warning.config.block.behavior.fence_gate.missing_powered: "<yellow>在文件 <arg:0> 发现问题 - 方块 '<arg:1>' 的 'fence_gate' 行为缺少必需的 'powered' 属性</yellow>"
warning.config.model.generation.missing_parent: "<yellow>在文件 <arg:0> 发现问题 - 配置项 '<arg:1>' 的 'generation' 段落缺少必需的 'parent' 参数</yellow>"
warning.config.model.generation.conflict: "<yellow>在文件 <arg:0> 发现问题 - 无法为 '<arg:1>' 生成模型 存在多个配置尝试使用相同路径 '<arg:2>' 生成不同的 JSON 模型</yellow>"
warning.config.model.generation.invalid_display_position: "<yellow>在文件 <arg:0> 发现问题 - 配置项 '<arg:1>' 在 'generation.display' 区域使用了无效的 display 位置类型 '<arg:2>'. 可用展示类型: [<arg:3>]</yellow>"

View File

@@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G
# Rule: [major update].[feature update].[bug fix]
project_version=0.0.57.5
config_version=37
lang_version=17
lang_version=18
project_group=net.momirealms
latest_supported_version=1.21.6