9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 19:39:11 +00:00

feat(bukkit): 添加作物方块条件判断和部分配置

This commit is contained in:
jhqwqmc
2025-03-28 11:22:06 +08:00
parent 5b5145199a
commit 6c94e4f2ab
6 changed files with 164 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ i18n:
item.fairy_flower: "Fairy Flower"
item.reed: "Reed"
item.flame_cane: "Flame Cane"
item.ender_pearl_crop_seed: "Ender Pearl Flower Seeds"
item.bench: "Bench"
item.table_lamp: "Table Lamp"
item.wooden_chair: "Wooden Chair"
@@ -43,6 +44,7 @@ i18n:
item.fairy_flower: "仙灵花"
item.reed: "芦苇"
item.flame_cane: "烈焰甘蔗"
item.ender_pearl_crop_seed: "末影珍珠花种子"
item.bench: "长椅"
item.table_lamp: "台灯"
item.wooden_chair: "木椅"

View File

@@ -35,6 +35,18 @@ items:
behavior:
type: block_item
block: default:flame_cane
default:ender_pearl_crop_seed:
material: paper
custom-model-data: 4003
data:
item-name: "<!i><i18n:item.ender_pearl_crop_seed>"
model:
template: default:model/simplified_generated
arguments:
path: "minecraft:item/custom/ender_pearl_crop_seed"
behavior:
type: block_item
block: default:ender_pearl_crop
blocks:
default:fairy_flower:
settings:
@@ -167,6 +179,120 @@ blocks:
age=5:
appearance: default
id: 7
default:ender_pearl_crop:
settings:
template:
- default:hardness/none
- default:sound/grass
overrides:
item: default:ender_pearl_crop_seed
push-reaction: DESTROY
map-color: 15
is-randomly-ticking: true
behavior:
type: crop_block
grow-speed: 1
min-grow-light: 9
bottom-blocks:
- minecraft:end_stone
loot:
pools:
- rolls: 1
entries:
- type: alternatives
children:
- type: item
item: "default:ender_pearl_crop_seed"
conditions:
- type: survives_explosion
- type: item
item: "minecraft:ender_pearl"
conditions:
- type: crop_ripe
functions:
- type: apply_bonus
enchantment: minecraft:fortune
formula:
type: ore_drops
- type: explosion_decay
count:
type: uniform
min: "1"
max: "5"
states:
properties:
age:
type: int
default: 0
range: 0~5
appearances:
default:
state: "sugar_cane:3"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage1"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage1"
age1:
state: "sugar_cane:4"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage2"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage2"
age2:
state: "sugar_cane:5"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage3"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage3"
age3:
state: "sugar_cane:6"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage4"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage4"
age4:
state: "sugar_cane:7"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage5"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage5"
age5:
state: "sugar_cane:8"
models:
- path: "minecraft:block/custom/ender_pearl_crop_stage6"
generation:
parent: "minecraft:block/crop"
textures:
"crop": "minecraft:block/custom/ender_pearl_crop_stage6"
variants:
age=0:
appearance: default
id: 8
age=1:
appearance: age1
id: 9
age=2:
appearance: age2
id: 10
age=3:
appearance: age3
id: 11
age=4:
appearance: age4
id: 12
age=5:
appearance: age5
id: 13
recipes:
default:paper_from_reed:
type: shaped