9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-06 15:52:03 +00:00

重构哈密瓜配置和相关代码

This commit is contained in:
XiaoMoMi
2025-09-23 18:27:03 +08:00
parent 0e4906443d
commit 9480737b84
19 changed files with 266 additions and 400 deletions

View File

@@ -0,0 +1,230 @@
items:
default:hami_melon_slice:
material: melon_slice
custom-model-data: 1000
data:
item-name: <!i><i18n:item.hami_melon_slice>
$$>=1.20.5:
food:
nutrition: 2
saturation: 1.0
can-always-eat: false
$$<=1.20.4:
settings:
food:
nutrition: 2
saturation: 1.0
model:
template: default:model/simplified_generated
arguments:
path: minecraft:item/custom/hami_melon_slice
default:hami_melon:
material: nether_brick
custom-model-data: 3023
data:
item-name: <!i><i18n:item.hami_melon>
model:
path: minecraft:item/custom/hami_melon
generation:
parent: minecraft:block/custom/hami_melon
behavior:
type: block_item
block: default:hami_melon
default:hami_melon_seeds:
material: nether_brick
custom-model-data: 3024
data:
item-name: <!i><i18n:item.hami_melon_seeds>
model:
template: default:model/simplified_generated
arguments:
path: minecraft:item/custom/hami_melon_seeds
behavior:
type: block_item
block: default:hami_melon_stem
blocks:
default:hami_melon:
loot:
pools:
- rolls: 1
entries:
- type: alternatives
children:
- type: item
item: default:hami_melon
conditions:
- type: enchantment
predicate: minecraft:silk_touch>=1
- type: item
item: default:hami_melon_slice
functions:
- type: set_count
add: false
count: 3~7
- type: apply_bonus
enchantment: minecraft:fortune
formula:
type: ore_drops
- type: limit_count
max: 9
- type: explosion_decay
settings:
map-color: 19
hardness: 1
resistance: 1
push-reaction: DESTROY
is-suffocating: true
is-redstone-conductor: true
tags:
- minecraft:enderman_holdable
- minecraft:mineable/axe
- minecraft:sword_efficient
state:
id: 30
state: note_block:30
model:
template: default:model/cube
arguments:
model: minecraft:block/custom/hami_melon
particle_texture: minecraft:block/custom/hami_melon
down_texture: minecraft:block/custom/hami_melon_bottom
up_texture: minecraft:block/custom/hami_melon_top
north_texture: minecraft:block/custom/hami_melon
east_texture: minecraft:block/custom/hami_melon
south_texture: minecraft:block/custom/hami_melon
west_texture: minecraft:block/custom/hami_melon
default:hami_melon_stem:
settings:
map-color: 7
hardness: 0
resistance: 0
push-reaction: DESTROY
is-suffocating: false
is-redstone-conductor: false
item: default:hami_melon_item
is-randomly-ticking: true
tags:
- minecraft:bee_growables
- minecraft:crops
- minecraft:maintains_farmland
behaviors:
- type: stem_block
fruit: default:hami_melon
attached-stem: default:attached_hami_melon_stem
- type: bush_block
bottom-blocks:
- minecraft:farmland
states:
properties:
age:
type: int
default: 0
range: 0~7
appearances:
age=0:
state: pumpkin_stem[age=0]
age=1:
state: pumpkin_stem[age=1]
age=2:
state: pumpkin_stem[age=2]
age=3:
state: pumpkin_stem[age=3]
age=4:
state: pumpkin_stem[age=4]
age=5:
state: pumpkin_stem[age=5]
age=6:
state: pumpkin_stem[age=6]
age=7:
state: pumpkin_stem[age=7]
variants:
age=0:
appearance: age=0
id: 0
age=1:
appearance: age=1
id: 1
age=2:
appearance: age=2
id: 2
age=3:
appearance: age=3
id: 3
age=4:
appearance: age=4
id: 4
age=5:
appearance: age=5
id: 5
age=6:
appearance: age=6
id: 6
age=7:
appearance: age=7
id: 7
default:attached_hami_melon_stem:
settings:
map-color: 7
hardness: 0
resistance: 0
push-reaction: DESTROY
is-suffocating: false
is-redstone-conductor: false
item: default:hami_melon_seeds
is-randomly-ticking: true
tags:
- minecraft:maintains_farmland
behaviors:
- type: attached_stem_block
fruit: default:hami_melon
stem: default:hami_melon_stem
- type: bush_block
blacklist: false
bottom-blocks:
- minecraft:farmland
states:
properties:
facing:
type: horizontal_direction
default: north
appearances:
facing=east:
state: attached_pumpkin_stem[facing=east]
facing=south:
state: attached_pumpkin_stem[facing=south]
facing=west:
state: attached_pumpkin_stem[facing=west]
facing=north:
state: attached_pumpkin_stem[facing=north]
variants:
facing=east:
appearance: facing=east
id: 0
facing=south:
appearance: facing=south
id: 1
facing=west:
appearance: facing=west
id: 2
facing=north:
appearance: facing=north
id: 3
recipes:
default:hami_melon:
type: shaped
pattern:
- AAA
- AAA
- AAA
ingredients:
A: default:hami_melon_slice
result:
id: default:hami_melon
count: 1
default:hami_melon_seeds:
type: shapeless
ingredients:
- default:hami_melon_slice
result:
id: default:hami_melon_seeds
count: 1

View File

@@ -1,298 +0,0 @@
items:
default:honeydew_item:
material: apple
custom-model-data: 1000
data:
item-name: <!i><i18n:item.honeydew_item>
model:
template: default:model/simplified_generated
arguments:
path: minecraft:item/custom/honeydew_item
behavior:
type: block_item
block: default:honeydew_stem
default:honeydew:
material: nether_brick
custom-model-data: 3023
data:
item-name: <!i><i18n:item.honeydew>
model:
path: minecraft:item/custom/honeydew
generation:
parent: minecraft:block/custom/honeydew
behavior:
type: block_item
block: default:honeydew
blocks:
default:honeydew:
loot:
pools:
- rolls: 1
entries:
- type: alternatives
children:
- type: item
item: default:honeydew
conditions:
- type: enchantment
predicate: minecraft:silk_touch>=1
- type: item
item: default:honeydew_item
functions:
- type: set_count
add: false
count: 3~7
- type: apply_bonus
enchantment: minecraft:fortune
formula:
type: ore_drops
- type: limit_count
max: 9
- type: explosion_decay
settings:
map-color: 19
hardness: 1
resistance: 1
push-reaction: DESTROY
is-suffocating: true
is-redstone-conductor: true
item: default:honeydew
tags:
- minecraft:enderman_holdable
- minecraft:mineable/axe
- minecraft:sword_efficient
incorrect-tool-dig-speed: 1
state:
id: 30
state: note_block:30
model:
template: default:model/cube
arguments:
model: minecraft:block/custom/honeydew
particle_texture: minecraft:block/custom/honeydew
down_texture: minecraft:block/custom/honeydew_bottom
up_texture: minecraft:block/custom/honeydew_top
north_texture: minecraft:block/custom/honeydew
east_texture: minecraft:block/custom/honeydew
south_texture: minecraft:block/custom/honeydew
west_texture: minecraft:block/custom/honeydew
default:honeydew_stem:
loot:
pools:
- rolls: 1
entries:
- type: item
item: default:honeydew_item
functions:
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 0
count:
type: binomial
extra: 3
probability: 0.06666667
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 1
count:
type: binomial
extra: 3
probability: 0.13333334
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 2
count:
type: binomial
extra: 3
probability: 0.2
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 3
count:
type: binomial
extra: 3
probability: 0.26666668
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 4
count:
type: binomial
extra: 3
probability: 0.33333334
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 5
count:
type: binomial
extra: 3
probability: 0.4
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 6
count:
type: binomial
extra: 3
probability: 0.46666667
- type: set_count
add: false
conditions:
- type: match_block_property
properties:
age: 7
count:
type: binomial
extra: 3
probability: 0.53333336
functions:
- type: explosion_decay
settings:
map-color: 7
hardness: 0
resistance: 0
push-reaction: DESTROY
is-suffocating: false
is-redstone-conductor: false
item: default:honeydew_item
is-randomly-ticking: true
tags:
- minecraft:bee_growables
- minecraft:crops
- minecraft:maintains_farmland
behaviors:
type: stem_block
fruit: default:honeydew
attached-stem: default:attached_honeydew_stem
blacklist: false
bottom-blocks:
- minecraft:farmland
states:
properties:
age:
type: int
default: 0
range: 0~7
appearances:
age=0:
state: pumpkin_stem[age=0]
age=1:
state: pumpkin_stem[age=1]
age=2:
state: pumpkin_stem[age=2]
age=3:
state: pumpkin_stem[age=3]
age=4:
state: pumpkin_stem[age=4]
age=5:
state: pumpkin_stem[age=5]
age=6:
state: pumpkin_stem[age=6]
age=7:
state: pumpkin_stem[age=7]
variants:
age=0:
appearance: age=0
id: 0
age=1:
appearance: age=1
id: 1
age=2:
appearance: age=2
id: 2
age=3:
appearance: age=3
id: 3
age=4:
appearance: age=4
id: 4
age=5:
appearance: age=5
id: 5
age=6:
appearance: age=6
id: 6
age=7:
appearance: age=7
id: 7
default:attached_honeydew_stem:
loot:
pools:
- rolls: 1
entries:
- type: item
item: default:honeydew_item
functions:
- type: set_count
add: false
count:
type: binomial
extra: 3
probability: 0.53333336
functions:
- type: explosion_decay
settings:
map-color: 7
hardness: 0
resistance: 0
push-reaction: DESTROY
is-suffocating: false
is-redstone-conductor: false
item: default:honeydew_item
is-randomly-ticking: true
tags:
- minecraft:maintains_farmland
behaviors:
type: attached_stem_block
fruit: default:honeydew
stem: default:honeydew_stem
blacklist: false
bottom-blocks:
- minecraft:farmland
states:
properties:
facing:
type: horizontal_direction
default: north
appearances:
facing=east:
state: attached_pumpkin_stem[facing=east]
facing=south:
state: attached_pumpkin_stem[facing=south]
facing=west:
state: attached_pumpkin_stem[facing=west]
facing=north:
state: attached_pumpkin_stem[facing=north]
variants:
facing=east:
appearance: facing=east
id: 0
facing=south:
appearance: facing=south
id: 1
facing=west:
appearance: facing=west
id: 2
facing=north:
appearance: facing=north
id: 3

View File

@@ -79,5 +79,6 @@ categories:
- default:wooden_chair
- default:flower_basket
- default:amethyst_torch
- default:honeydew_item
- default:honeydew
- default:hami_melon_seeds
- default:hami_melon_slice
- default:hami_melon

View File

@@ -49,8 +49,9 @@ i18n:
item.safe_block: Safe Block
item.sofa: Sofa
item.amethyst_torch: Amethyst Torch
item.honeydew_item: Honeydew Slice
item.honeydew: Honeydew
item.hami_melon_slice: Hami Melon Slice
item.hami_melon: Hami Melon
item.hami_melon_seeds: Hami Melon Seeds
category.default.name: Default Assets
category.default.lore: Contains the default configuration of CraftEngine
category.palm_tree: Palm Tree
@@ -109,8 +110,9 @@ i18n:
item.safe_block: 保险柜
item.sofa: 沙发
item.amethyst_torch: 紫水晶火把
item.honeydew_item: 哈密瓜片
item.honeydew: 哈密瓜
item.hami_melon_slice: 哈密瓜片
item.hami_melon: 哈密瓜
item.hami_melon_seeds: 哈密瓜种子
category.default.name: 默认资产
category.default.lore: 包含了CraftEngine的默认配置
category.palm_tree: 棕榈树
@@ -153,9 +155,9 @@ lang:
block_name:default:sofa: Sofa
block_name:default:amethyst_torch: Amethyst Torch
block_name:default:amethyst_wall_torch: Amethyst Torch
block_name:default:honeydew: Honeydew
block_name:default:honeydew_stem: Honeydew Stem
block_name:default:default:attached_honeydew_stem: Honeydew Stem
block_name:default:hami_melon: Hami Melon
block_name:default:hami_melon_stem: Hami Melon Stem
block_name:default:default:attached_hami_melon_stem: Hami Melon Stem
zh_cn:
block_name:default:chinese_lantern: 灯笼
block_name:default:netherite_anvil: 下界合金砧
@@ -186,6 +188,6 @@ lang:
block_name:default:sofa: 沙发
block_name:default:amethyst_torch: 紫水晶火把
block_name:default:amethyst_wall_torch: 紫水晶火把
block_name:default:honeydew: 哈密瓜
block_name:default:honeydew_stem: 哈密瓜茎
block_name:default:default:attached_honeydew_stem: 哈密瓜茎
block_name:default:hami_melon: 哈密瓜
block_name:default:hami_melon_stem: 哈密瓜茎
block_name:default:default:attached_hami_melon_stem: 哈密瓜茎