mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
refactor crops
This commit is contained in:
@@ -62,4 +62,4 @@ categories:
|
||||
- default:flame_cane
|
||||
- default:gunpowder_block
|
||||
- default:solid_gunpowder_block
|
||||
- default:ender_pearl_crop_seed
|
||||
- default:ender_pearl_flower_seed
|
||||
@@ -4,7 +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.ender_pearl_flower_seed: "Ender Pearl Flower Seeds"
|
||||
item.bench: "Bench"
|
||||
item.table_lamp: "Table Lamp"
|
||||
item.wooden_chair: "Wooden Chair"
|
||||
@@ -44,7 +44,7 @@ i18n:
|
||||
item.fairy_flower: "仙灵花"
|
||||
item.reed: "芦苇"
|
||||
item.flame_cane: "烈焰甘蔗"
|
||||
item.ender_pearl_crop_seed: "末影珍珠花种子"
|
||||
item.ender_pearl_flower_seed: "末影珍珠花种子"
|
||||
item.bench: "长椅"
|
||||
item.table_lamp: "台灯"
|
||||
item.wooden_chair: "木椅"
|
||||
|
||||
@@ -35,18 +35,18 @@ items:
|
||||
behavior:
|
||||
type: block_item
|
||||
block: default:flame_cane
|
||||
default:ender_pearl_crop_seed:
|
||||
default:ender_pearl_flower_seed:
|
||||
material: paper
|
||||
custom-model-data: 4003
|
||||
data:
|
||||
item-name: "<!i><i18n:item.ender_pearl_crop_seed>"
|
||||
item-name: "<!i><i18n:item.ender_pearl_flower_seed>"
|
||||
model:
|
||||
template: default:model/simplified_generated
|
||||
arguments:
|
||||
path: "minecraft:block/custom/ender_pearl_crop_seed"
|
||||
path: "minecraft:block/custom/ender_pearl_flower_seed"
|
||||
behavior:
|
||||
type: block_item
|
||||
block: default:ender_pearl_crop
|
||||
block: default:ender_pearl_flower
|
||||
blocks:
|
||||
default:fairy_flower:
|
||||
settings:
|
||||
@@ -179,15 +179,15 @@ blocks:
|
||||
age=5:
|
||||
appearance: default
|
||||
id: 7
|
||||
default:ender_pearl_crop:
|
||||
default:ender_pearl_flower:
|
||||
settings:
|
||||
template:
|
||||
- default:hardness/none
|
||||
- default:sound/grass
|
||||
overrides:
|
||||
item: default:ender_pearl_crop_seed
|
||||
item: default:ender_pearl_flower_seed
|
||||
push-reaction: DESTROY
|
||||
map-color: 15
|
||||
map-color: 24
|
||||
is-randomly-ticking: true
|
||||
behavior:
|
||||
type: crop_block
|
||||
@@ -196,64 +196,47 @@ blocks:
|
||||
bottom-blocks:
|
||||
- minecraft:end_stone
|
||||
loot:
|
||||
pools:
|
||||
- rolls: 1
|
||||
entries:
|
||||
- type: item
|
||||
item: "default:ender_pearl_crop_seed"
|
||||
conditions:
|
||||
- type: survives_explosion
|
||||
- rolls:
|
||||
type: uniform
|
||||
min: "1"
|
||||
max: "5"
|
||||
entries:
|
||||
- type: item
|
||||
item: "minecraft:ender_pearl"
|
||||
conditions:
|
||||
- type: crop_ripe
|
||||
template: default:loot_table/seed_crop
|
||||
arguments:
|
||||
crop_item: minecraft:ender_pearl
|
||||
crop_seed: default:ender_pearl_flower_seed
|
||||
ripe_age: 4
|
||||
states:
|
||||
properties:
|
||||
age:
|
||||
type: int
|
||||
default: 0
|
||||
range: 0~5
|
||||
range: 0~3
|
||||
appearances:
|
||||
default:
|
||||
stage_0:
|
||||
state: "tripwire:0"
|
||||
models:
|
||||
- path: "minecraft:block/custom/ender_pearl_flower_stage_0"
|
||||
stage_1:
|
||||
state: "tripwire:1"
|
||||
models:
|
||||
- path: "minecraft:block/custom/ender_pearl_flower_stage_1"
|
||||
stage_2:
|
||||
state: "tripwire:2"
|
||||
models:
|
||||
- path: "minecraft:block/custom/ender_pearl_flower_stage_2"
|
||||
stage_3:
|
||||
state: "sugar_cane:3"
|
||||
models:
|
||||
- path: "minecraft:block/custom/ender_pearl_crop_stage1"
|
||||
generation:
|
||||
parent: "minecraft:block/custom/tinted_cross"
|
||||
textures:
|
||||
"cross": "minecraft:block/custom/ender_pearl_crop_stage1"
|
||||
ripe:
|
||||
state: "sugar_cane:4"
|
||||
models:
|
||||
- path: "minecraft:block/custom/ender_pearl_crop_stage2"
|
||||
generation:
|
||||
parent: "minecraft:block/custom/tinted_cross"
|
||||
textures:
|
||||
"cross": "minecraft:block/custom/ender_pearl_crop_stage2"
|
||||
- path: "minecraft:block/custom/ender_pearl_flower_stage_3"
|
||||
variants:
|
||||
age=0:
|
||||
appearance: default
|
||||
id: 8
|
||||
appearance: stage_0
|
||||
id: 0
|
||||
age=1:
|
||||
appearance: default
|
||||
id: 9
|
||||
appearance: stage_1
|
||||
id: 1
|
||||
age=2:
|
||||
appearance: default
|
||||
id: 10
|
||||
appearance: stage_2
|
||||
id: 2
|
||||
age=3:
|
||||
appearance: default
|
||||
id: 11
|
||||
age=4:
|
||||
appearance: default
|
||||
id: 12
|
||||
age=5:
|
||||
appearance: ripe
|
||||
id: 13
|
||||
appearance: stage_3
|
||||
id: 8
|
||||
recipes:
|
||||
default:paper_from_reed:
|
||||
type: shaped
|
||||
|
||||
@@ -953,7 +953,12 @@ templates#recipes:
|
||||
|
||||
# loot tables
|
||||
templates#loot_tables:
|
||||
|
||||
# drop one item
|
||||
|
||||
# template: default:loot_table/basic
|
||||
# arguments:
|
||||
# item: the item
|
||||
default:loot_table/basic:
|
||||
pools:
|
||||
- rolls: 1
|
||||
@@ -962,7 +967,12 @@ templates#loot_tables:
|
||||
entries:
|
||||
- type: item
|
||||
item: "{item}"
|
||||
|
||||
# drop with silk touch
|
||||
|
||||
# template: default:loot_table/silk_touch
|
||||
# arguments:
|
||||
# item: the item
|
||||
default:loot_table/silk_touch:
|
||||
pools:
|
||||
- rolls: 1
|
||||
@@ -972,7 +982,78 @@ templates#loot_tables:
|
||||
entries:
|
||||
- type: item
|
||||
item: "{item}"
|
||||
# drop ores
|
||||
|
||||
# crop drops
|
||||
|
||||
# template: default:loot_table/seed_crop
|
||||
# arguments:
|
||||
# crop_item: the ripe crop
|
||||
# crop_seed: the seed of the crop
|
||||
# ripe_age: the max age
|
||||
default:loot_table/seed_crop:
|
||||
pools:
|
||||
- rolls: 1
|
||||
entries:
|
||||
- type: alternatives
|
||||
children:
|
||||
- type: item
|
||||
item: "{crop_item}"
|
||||
conditions:
|
||||
- type: match_block_property
|
||||
properties:
|
||||
age: "{ripe_age}"
|
||||
- type: item
|
||||
item: "{crop_seed}"
|
||||
- rolls: 1
|
||||
conditions:
|
||||
- type: match_block_property
|
||||
properties:
|
||||
age: "{ripe_age}"
|
||||
entries:
|
||||
- type: item
|
||||
item: "{crop_seed}"
|
||||
functions:
|
||||
- type: apply_bonus
|
||||
enchantment: minecraft:fortune
|
||||
formula:
|
||||
type: binomial_with_bonus_count
|
||||
extra: 3
|
||||
probability: 0.5714286
|
||||
|
||||
# template: default:loot_table/crop
|
||||
# arguments:
|
||||
# crop_item: the ripe crop
|
||||
# ripe_age: the max age
|
||||
default:loot_table/crop:
|
||||
pools:
|
||||
- rolls: 1
|
||||
entries:
|
||||
- type: item
|
||||
item: "{crop_item}"
|
||||
- rolls: 1
|
||||
conditions:
|
||||
- type: match_block_property
|
||||
properties:
|
||||
age: "{ripe_age}"
|
||||
entries:
|
||||
- type: item
|
||||
item: "{crop_item}"
|
||||
functions:
|
||||
- type: apply_bonus
|
||||
enchantment: minecraft:fortune
|
||||
formula:
|
||||
type: binomial_with_bonus_count
|
||||
extra: 3
|
||||
probability: 0.5714286
|
||||
|
||||
# ore drops
|
||||
|
||||
# template: default:loot_table/ore
|
||||
# arguments:
|
||||
# ore_block: the ore block
|
||||
# ore_drop: the drops of the ore
|
||||
# min_exp: the min exp to drop
|
||||
# max_exp: the max exp to drop
|
||||
default:loot_table/ore:
|
||||
pools:
|
||||
- rolls: 1
|
||||
@@ -997,7 +1078,37 @@ templates#loot_tables:
|
||||
type: uniform
|
||||
min: "{min_exp}"
|
||||
max: "{max_exp}"
|
||||
# leaves
|
||||
|
||||
# template: default:loot_table/ore_no_exp
|
||||
# arguments:
|
||||
# ore_block: the ore block
|
||||
# ore_drop: the drops of the ore
|
||||
default:loot_table/ore_no_exp:
|
||||
pools:
|
||||
- rolls: 1
|
||||
entries:
|
||||
- type: alternatives
|
||||
children:
|
||||
- type: item
|
||||
item: "{ore_block}"
|
||||
conditions:
|
||||
- type: enchantment
|
||||
predicate: minecraft:silk_touch>=1
|
||||
- type: item
|
||||
item: "{ore_drop}"
|
||||
functions:
|
||||
- type: apply_bonus
|
||||
enchantment: minecraft:fortune
|
||||
formula:
|
||||
type: ore_drops
|
||||
- type: explosion_decay
|
||||
|
||||
# leaves drops
|
||||
|
||||
# template: default:loot_table/leaves
|
||||
# arguments:
|
||||
# leaves: the leaves block
|
||||
# sapling: the sapling item
|
||||
default:loot_table/leaves:
|
||||
pools:
|
||||
- rolls: 1
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"particle": "#cross"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0.8, 0, 8 ],
|
||||
"to": [ 15.2, 16, 8 ],
|
||||
"rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" },
|
||||
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }
|
||||
}
|
||||
},
|
||||
{ "from": [ 8, 0, 0.8 ],
|
||||
"to": [ 8, 16, 15.2 ],
|
||||
"rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" },
|
||||
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user