9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-20 07:29:17 +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 # crop drops
#
# This template is suitable for crops such as wheat and beetroot
#
# template: default:loot_table/seed_crop # template: default:loot_table/seed_crop
# arguments: # arguments:
# crop_item: the ripe crop # crop_item: the mature crop item
# crop_seed: the seed of the crop # 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 # ripe_age: the max age
default:loot_table/seed_crop: default:loot_table/seed_crop:
pools: pools:
@@ -3253,6 +3258,10 @@ templates#loot_tables:
- type: match_block_property - type: match_block_property
properties: properties:
age: ${ripe_age} age: ${ripe_age}
functions:
- type: set_count
add: false
count: ${crop_item_count:-1}
- type: item - type: item
item: ${crop_seed} item: ${crop_seed}
- rolls: 1 - rolls: 1
@@ -3268,12 +3277,15 @@ templates#loot_tables:
enchantment: minecraft:fortune enchantment: minecraft:fortune
formula: formula:
type: binomial_with_bonus_count type: binomial_with_bonus_count
extra: 3 extra: ${extra_seed_count:-3}
probability: 0.5714286 probability: 0.5714286
#
# This template is suitable for crops like carrots and potatoes.
#
# template: default:loot_table/crop # template: default:loot_table/crop
# arguments: # 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 # ripe_age: the max age
default:loot_table/crop: default:loot_table/crop:
pools: pools:
@@ -3294,7 +3306,7 @@ templates#loot_tables:
enchantment: minecraft:fortune enchantment: minecraft:fortune
formula: formula:
type: binomial_with_bonus_count type: binomial_with_bonus_count
extra: 3 extra: ${extra_crop_count:-3}
probability: 0.5714286 probability: 0.5714286
# ore drops # ore drops