andersblomqvist / enhanced-mob-spawners

Mod for Minecraft (Fabric). Adding new features to the Spawner
https://www.curseforge.com/minecraft/mc-mods/enhanced-mob-spawners
Creative Commons Zero v1.0 Universal
9 stars 14 forks source link

[Bug] Config generates wrong Better End/Nether mob names #70

Closed Nitjsefnie closed 7 months ago

Nitjsefnie commented 1 year ago

The current generated config is wrong for Better End/Nether mobs

"disable_specific_egg_drops": { "betterend:spawn_e": 0, "betterend:spawn_eg": 0, "betterend:spawn_egg": 0, "betterend:spawn_egg_sha": 0, "betternether:spaw": 0, "betternether:spawn": 0, "betternether:spawn_e": 0, "betternether:spawnegg": 0, "betternether:spawn_egg_hydrogen": 0, "betternether:spawn_egg_jungl": 0, "minecraft:allay": 0, ... }

https://github.com/andersblomqvist/enhanced-mob-spawners/blob/5fb672109ebc9afdec3ee948f33f0745a708546b/src/main/java/com/branders/spawnermod/config/ConfigValues.java#L50 - simply cutting off 10 characters won't work, due to items having name better[nether/end]:spawnegg[mob_name].

dadadadaan commented 7 months ago

Bit late to the party, but wanted to check open issues before possibly submitting a dupe since I just started getting the same issue myself. This seems to happen with a lot of other mods to the point that it's not even really a "mod-conflict" as much as it might be a chance to make a more flexible solution. At maybe only 7 more lines of codes (maybe even less if I wasn't such a mid programmer) a possible fix for this would be to check if "spawn_egg" is the first set of characters in the string after the colon. if yes, remove the first ten characters after the colon, else default back to removing the last 10 characters. The extra adaptability would make it compatible with a ton of over mods that are already out there, like Alex's Mobs and Caves or the "Better (x)" series as mentioned by OP.

andersblomqvist commented 7 months ago

This is now fixed in the patch for mc 1.20.4, I might add the fix to 1.20.1.

dadadadaan commented 6 months ago

Backporting would be awesome since I could add it back to the modpack Im currently playing. Not sure why but the mod community is really vibing with 1.20.1 lol

andersblomqvist commented 6 months ago

I've updated the mod for minecraft 1.20.1 which fixes this issue.

Link to new file: https://modrinth.com/mod/enhanced-mob-spawners/version/1.2.6