From 2baec405c8ebe7f9d8f793a755a72f5501c43ab8 Mon Sep 17 00:00:00 2001 From: XiaoMoMi <972454774@qq.com> Date: Thu, 30 Oct 2025 04:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=9C=E4=BD=9C=E7=89=A9?= =?UTF-8?q?=E6=8E=89=E8=90=BD=E7=89=A9=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/configuration/templates.yml | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/common-files/src/main/resources/resources/default/configuration/templates.yml b/common-files/src/main/resources/resources/default/configuration/templates.yml index 9e6140712..82fc59d30 100644 --- a/common-files/src/main/resources/resources/default/configuration/templates.yml +++ b/common-files/src/main/resources/resources/default/configuration/templates.yml @@ -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