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

优化农作物掉落物模板

This commit is contained in:
XiaoMoMi
2025-10-30 04:11:21 +08:00
parent de92f3bf69
commit 2baec405c8

View File

@@ -3236,10 +3236,15 @@ templates#loot_tables:
# crop drops
#
# This template is suitable for crops such as wheat and beetroot
#
# template: default:loot_table/seed_crop
# arguments:
# crop_item: the ripe crop
# crop_seed: the seed of the crop
# crop_item: the mature crop item
# crop_item_count: quantity of mature crop items
# crop_seed: the seed item of the crop
# extra_seed_count: additional seeds dropped when crop reaches maturity
# ripe_age: the max age
default:loot_table/seed_crop:
pools:
@@ -3253,6 +3258,10 @@ templates#loot_tables:
- type: match_block_property
properties:
age: ${ripe_age}
functions:
- type: set_count
add: false
count: ${crop_item_count:-1}
- type: item
item: ${crop_seed}
- rolls: 1
@@ -3268,12 +3277,15 @@ templates#loot_tables:
enchantment: minecraft:fortune
formula:
type: binomial_with_bonus_count
extra: 3
extra: ${extra_seed_count:-3}
probability: 0.5714286
#
# This template is suitable for crops like carrots and potatoes.
#
# template: default:loot_table/crop
# arguments:
# crop_item: the ripe crop
# crop_item: the crop item
# extra_crop_count: additional crops dropped when crop reaches maturity
# ripe_age: the max age
default:loot_table/crop:
pools:
@@ -3294,7 +3306,7 @@ templates#loot_tables:
enchantment: minecraft:fortune
formula:
type: binomial_with_bonus_count
extra: 3
extra: ${extra_crop_count:-3}
probability: 0.5714286
# ore drops