You're in Grave Danger

You're in Grave Danger

17M Downloads

[1.18] Request to add enchantment-based blacklist

kwpugh opened this issue · 2 comments

commented

Hi, I make a mod that has a "soul bound" type enchantment, which your mod does not take into account because of the differences in where our mods mixin to vanilla code.

I was wondering if you would consider a feature to the config or a JSON that would allow for a bypass of items in players pre-respawn inventory based upon the items's enchantment, kind of an enchantment blacklist.

I mixin to PlayerEntity and insert a conditional into the "dropItem()" method (giving the player back any items enchanted with the Bound enchantment) and later use the Fabric ServerPlayerEvent.copyFrom() to copy the players pre-respawn inventory. I think my code is never reached because you are capturing further up the hierarchy with the "drop()" method in LivingEntity.

Also, I was looking at a couple other mods for 1.17.1 (with soul bound type mechanisms) that have not updated and I believe they will have the same issue.

Without it, players will not likely play with both of our mods.

Thank you for considering.

Regards,

Kevin

Here is my mod if you want to look at what I'm doing: https://www.curseforge.com/minecraft/mc-mods/more-gems-fabric
its the Bound Enchantment,

commented

Hey, just realized you already have a config option for this. Just tried it and it works as expected. Have a great day.

commented

Wow mod development is easy. I don’t even have to do anything for issues to be fixed.

Jokes aside, this was important to me to include, as this feature did not work with other grave mods I had tried.
Anyways thank you for using my mod and don’t hesitate to report any other bug/feature request/missing config.
Have a great day!