mojira.dev

Curtis Phillips

Assigned

No issues.

Reported

View all
MC-273411 "block_experience" enchantment effect doesn't affect XP dropped Community Consensus MCPE-89828 Zombified Piglins Hostility not Spreading Duplicate

Comments

Sorry trying my best to explain it.

In vanilla, Diamond Ore should yield about 3-7 XP when mined without Silk Touch.

The effect component `minecraft:block_experience` is supposed to change the value for the "Amount of experience awarded for breaking a block"

The bug is that `minecraft:block_experience` doesn't actually affect the XP dropped.

 

In the provided datapack example I have an enchantment "Learned", that is supposed to increase the XP awarded for killing mobs and for breaking blocks. It is supposed to increase the XP dropped by 10 per level, up to level 3. This works fine for `minecraft:mob_experience`; however, for `minecraft:block_experience` there is no change in how much XP is dropped when breaking the block.

Steps to reproduce:

  • Add datapack to world

  • Enchant helmet with Learned enchantment level 3, expected output would be +30 XP per mob killed and per block broken (If it drops XP)

  • Kill mob without wearing the helmet to see base XP gained

  • Clear XP/Levels

  • Equip Enchanted Helmet

  • Kill mob to see how much XP is gained through the enchantment

  • Clear XP/Levels

  • Break diamond ore without wearing the helmet using a non-silk touch pickaxe to see base XP gained

  • Clear XP/Levels

  • Equip Enchanted Helmet

  • Break diamond ore using a non-silk touch pickaxe to see base XP gained through the enchantment

  • Note, no increase to how much XP the diamond ore drops on being broken

Furthermore, copying the exact code for the vanilla Silk Touch enchantment (Which sets the value of XP dropped to 0) and using that also does not affect the XP dropped from blocks.

So the code for XP drops is somewhere else for Silk Touch, and is not reliant on the effect component `minecraft:block_experience`

Attached the reproduction datapack.

 

Expected result is `mob_experience` and `block_experience` yielding more XP than the default that is dropped.

`mob_experience` works and XP dropped increases from mobs increases,

`block_experience` does not affect the XP dropped by blocks at all. Even copying the vanilla Silk Touch json, where `block_experience` is present and sets the value to 0, does not affect the XP dropped from blocks.

Can the override be used for other colors or just from black to blue (0 - 255)?