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

Merge pull request #486 from jhqwqmc/feat/drop-experience-block

添加掉落经验方块
This commit is contained in:
XiaoMoMi
2025-12-04 05:50:11 +08:00
committed by GitHub
4 changed files with 118 additions and 7 deletions

View File

@@ -27,13 +27,17 @@ items:
texture: minecraft:item/custom/topaz
blocks:
default:topaz_ore:
behavior:
type: drop_experience_block
amount: 3~7
condition:
type: enchantment
predicate: minecraft:silk_touch<=0
loot:
template: default:loot_table/ore
arguments:
ore_drop: default:topaz
ore_block: default:topaz_ore
min_exp: 3
max_exp: 7
settings:
template: default:settings/ore
arguments:
@@ -45,13 +49,17 @@ blocks:
arguments:
path: minecraft:block/custom/topaz_ore
default:deepslate_topaz_ore:
behavior:
type: drop_experience_block
amount: 3~7
condition:
type: enchantment
predicate: minecraft:silk_touch<=0
loot:
template: default:loot_table/ore
arguments:
ore_drop: default:topaz
ore_block: default:deepslate_topaz_ore
min_exp: 3
max_exp: 7
settings:
template: default:settings/deepslate_ore
arguments:

View File

@@ -180,7 +180,6 @@ templates:
# ore_block: the ore block
# ore_drop: the drops of the ore material
# ore_drop_count: the amount of the ore materials
# exp: the exp to drop
default:loot_table/ore:
pools:
- rolls: 1
@@ -203,8 +202,6 @@ templates:
formula:
type: ore_drops
- type: explosion_decay
- type: drop_exp
count: ${exp:-2~4}
# Using Silk Touch or shears will cause the leaves block itself to drop.
# Using Fortune, however, increases the drop rates of sticks and saplings.