Xp is not obtained when simple harvest
Luicuelo opened this issue ยท 15 comments
Not giving xp when "Simple Harvest" = true
Version: XPFromHarvest-1.15.2-1.2.0.jar
To reproduce the problem, activate the "simple harvest" option in the config and when the crops are right-clicked, no experience will be gained.
Nothing appears in the log as there is no crash or something similar
What other mods do you have? Currently many mods implement simple harvest functionality (even Quark has one), this may clash with XPFH simple harvest functionality.
I think there is no conflict, if I remove XPFromHarvest right click no longer works.
I attach the rest of the mods, but none add functionalities related to crops
268566;MekanismGenerators-;
268567;MekanismTools-;
345425;MekanismAdditions-;
268560;Mekanism-;
353051;GameMenuModOption-;
240633;inventorysorter-;
248787;AppleSkin-mc;
352835;backpacked-;
228525;Bookshelf-;
243883;ChickenChunks-;
242818;CodeChickenLib-;
276951;comforts-FORGE;
239197;CraftTweaker-;
328085;create-mc;2
267602;CTM-MC;2
309927;curios-FORGE;
232758;CyclopsCore-;
291936;findme-;
290404;Flopper-;
238551;gravestone-;
253449;Hwyla-forge;
231951;ImmersiveEngineering-;
228756;ironchest-;
238222;jei-;
32274;journeymap-;
240630;JustEnoughResources-;
351948;mining-helmet;
252848;NaturesCompass-;
238372;Neat;
296686;rsgauges-;
223852;StorageDrawers-;
79287;WailaHarvestability-mc;
224712;WAWLA-;
289397;XPFromHarvest-;
I tried your modpack and everything looks good, right clicking on mature crop harvests it and gives xp. Can you post your config? Default should be:
#Enable simple harvesting and replanting with right click
"Simple Harvest" = true
#Curiosity Mode: sneak + right click with on block to get info in chat
Curiosity = false
#List of crops to process with their ages
"Crops List" = ["Block{minecraft:potatoes}[age=7]", "Block{minecraft:carrots}[age=7]", "Block{minecraft:wheat}[age=7]", "Block{minecraft:beetroots}[age=3]", "Block{minecraft:nether_wart}[age=3]"]
#Amount of XP given
#Range: > 1
"XP Amount" = 1
#Chance in % of XP orb spawning after harvest done
#Range: 1 ~ 100
Chance = 100
Sorry for the mistake, you're right. The experience bar is increasing
There are no xp orbs, and there is no sound when gaining experience, unlike when the "simple harvest" option is enabled, but after collecting enough crop it did go up a level. It is giving experience, but more quietly.
Ah yes, there's a little quirk with versions above 1.12.2. In Forge for 1.12 there was an entity EntityXPOrb
which I spawned if simple harvest was successful:
Alas I did not find such entity in Forge above 1.12, so I had to simply give needed XP to the player:
I did not reflect it in release notes and I guess that's what calls confusion for players, but I cannot do anything about it. If you can point me to the right class in Forge API I'll gladly add it to 1.15 version of the mod.
It is not the same result to give the experience directly to the player than to create an XP orb. For example, I used to collect the crops with thaumcraft golems and the xp generated in orbs was stored in "brain in jar"
I think the equivalent class for 1.15.2 EntityXPOrb could be ExperienceOrbEntity.
https://forge.yue.moe/javadoc/1.15.2/net/minecraft/entity/item/ExperienceOrbEntity.html
Here's preview build with ExperienceOrbEntity
added on simple harvest:
XPFromHarvest-1.15.2-1.2.1.jar.zip
Try it out.
It works perfectly, with that satisfying sound every time you pick up an orbe. Thank you very much for your work, This mod cannot be missing in a modpack.