Hey there, I'm back with another report ;)

This time around, it seems like the compatibility function with Flat Exp Costs has broken. I've set my `set_level_cost` to 100, which gets calculated properly, but the game doesn't check whether I actually have 100xp to spend: it still checks for the levels it would cost without FEC installed. Since the game checks if you can grind based on your levels, you can grind something that should cost 100xp if you only have 1 level, which is just 7xp, or 300xp if you only have 3 levels which is 27xp, and so on.

This used to be a problem with the Flat Exp Costs mod itself too, but they've fixed it in the latest version. Maybe you could base your solution off of their implementation :)

Cheers!

Op di 1 sep 2026 om 23:07 schreef Samuel <samuel4el@gmail.com>:
That’s great news! Thank you for your service!

On Tue, 1 Sep 2026 at 22:14, mschae <contact@mschae23.de> wrote:
On 20.08.2026 15:31, mschae wrote:
>> Did a bit more testing on a clean instance with only the Fabric API and
>> Grind enchantments installed, and found out that it doesn't happen with
>> the default config, but does with my custom one. I'll attach it here so
>> you can test it for yourself.
>
> Thanks! Having the config is really helpful. I sadly can't tell what would
> cause this issue at first glance (everything seems to look correct to me).
>
> It's odd that it works fine with the default config, as I don't see anything
> that would change the behaviour of checking whether you have enough XP. The
> cost function is different, of course, but that's just used for determining
> how much has to be paid. "consume_enchanted_item" only has an effect once
> you take the resulting item. And if it's reproducable in a clean instance
> without other mods, it couldn't be mod compatibility code either...
>
> So yeah, I wish I could debug this immediately, but as I mentioned, I can't.
> I hope it's alright if you have to wait a bit.

Hey, sorry it took a while! I just uploaded version 4.2.1 to Modrinth and
CurseForge, which should fix this issue.

It was an oversight in the code that checks whether you're allowed to take the
enchanted book, which only looked at the top slot instead of the enchanted item
because of a copy-paste error...

And it looked like it worked in the default config because that one has an
offset of 8 levels that are always needed.

Anyway, it should be working fine now :)
Thanks for reporting!