Feature Request: Configurable blacklist for right click interaction with spawners
Raidobw2 opened this issue ยท 6 comments
Hi! This is a suggestion for the 1.18.2 version of the mod.
At FTBTeam/FTB-Modpack-Issues#1221 a user noticed a compat issue between Soul Shards and Enhanced Mob Spawners.
If a player holds a Soul Shard and right clicks a spawner with Enhanced Mob Spawners, it kind of bugs out. My suggestion would be to have a blacklist by item id within Enhanced Mob Spawners to be able to prevent some held items to "pop" the spawn egg out of the spawner. I assume this would allow normal interactions between the spawners and the other mods, such as Soul Shards.
Here's a small video explaining the issue and why I'm suggesting this change (souls are being duped, normally the spawner is consumed in the process):
soul_shard.mp4
Thanks for reading and have a nice day!
I've added support for blacklisting item ids through the config. You can add items like this:
"item_id_blacklist": [
1103,
767
],
When starting with the new version, the mod will generate two new fields inside the config file if they are missing: item_id_blacklist
and display_item_id_from_right_click_in_log
. The display in log tag will print the item id which the player is holding in the minecraft log window.
New version: https://www.curseforge.com/minecraft/mc-mods/enhanced-mob-spawners/files/3940481
Please report back if this works, then I will change the file from beta-version to a release.
Wow that was quick haha. I've just tested it! Works like a charm :)
I've checked the item id first and added it to the list, then relaunched and added a mod in (Quark) to make sure it was persistent, and it is!
spawner_right_click.mp4
I can confirm it works, feel free to make it a release and thank you very much!
Hi again, just wanted to know if you would be disposed to revise the implementation of this feature. I've started using it more in development builds for modpack maintenance and it seems everytime there is a registry change (e.g. item removed or added) the item ids (integer) change.
Currently it does work well, although I have to remind myself before every release to the public to check if the interaction still works well.
I thank you again for this feature so quickly added to your mod, that was a lifesaver for some spawner interactions.
If you do want to revise it at some point, maybe you can use the item's localized resource name, such as minecraft:apple
, minecraft:carrot
, soulshards:soul_shard
, etc.
Have a good day in any case!
I've changed to registry names now. It's a much better solution for the user as well.
Now you should remove all of the existing ids (they don't do any known damage if left) and write as following:
"item_id_blacklist": [
"minecraft:apple",
"minecraft:carrot",
"soulshards:soul_shard"
],
Forge version 1.8.17 is found here: https://www.curseforge.com/minecraft/mc-mods/enhanced-mob-spawners/files/3957300