Simple Harvest ignores Fortune enchantment
Dekamir opened this issue ยท 12 comments
Drops should increase when the held item has the Fortune enchantment (tool type doesn't matter).
Instead, regular drop tables apply.
Doesn't affect regular (left-click) breaking.
I see, with block break I use block.dropXpOnBlockBreak
in 12.2 or block.popExperience
in later versions which I guess is triggered after block is broken and takes enchantments into account by MC itself. For simple harvest I simply use EntityXPOrb
in 12.2, ExperienceOrbEntity
in 16.5 or player.giveExperiencePoints
in 1.18. Is there any way to spawn XP orb by MC that will work exactly like popExperience
?
I used to use a hacky way to do it.
Check if the player is holding a tool with Fortune (and is in Survival/Adventure - or not Creative) > Spawn more ores when block is broken.
I'm not proud of it, I just couldn't find a better way to do so.
Well if Forge does not provide better way to do it then your solution is the one to go. I'll take a look when I have some time.
By the way do you know any good source of Forge API documentation? With good description of classes and methods? This one seems shallow to me https://mcforge.readthedocs.io/en/1.18.x/
I mostly use that one, too. Forge is cryptic, and there is not many documentors outside of themselves.
Maybe I'll find some other people complaining and find other ways.
BTW, I'm talking about the item drops, not XP. I just realised I may have forgot to mention that. Just to check.
No (according to Wiki).
In fact, there is no mechanic in Vanilla to increase XP gains.
BTW, I'm talking about the item drops, not XP. I just realised I may have forgot to mention that. Just to check.
Good point BTW. Please remind me do players get more XP from mining with fortune enchanted pickaxe?