p1ut0nium-git / Rough-Mobs-Revamped

Rough Mobs Revamped for Minecraft
https://www.curseforge.com/minecraft/mc-mods/rough-mobs-revamped
4 stars 8 forks source link

[Feature/QoL] easier debugging in console for faulty mob attributes #10

Closed SandwichHorror closed 4 years ago

SandwichHorror commented 4 years ago

It seems almost every mob mod has a different method of applying attributes. Sometimes this means a mob does not recognize "generic.armorToughness" or even attackDamage. This spams the console with errors, but does not specify the name of the affected entity. Would it be possible to have the console output recognize the affected entity to more easily address attribute errors?

p1ut0nium-git commented 4 years ago

Hi SandwhichHorror. Thanks for the feature request. I need a little more info from you to understand what you're asking for. It sounds like you want me to add an option that lets you output an entity id/name when an error occurs? Like for instance, what mod is spamming you with errors that you need more info from?

SandwichHorror commented 4 years ago

For example, the console outputs [14:38:57] [Server thread/WARN] [FML]: * [Rough Mobs Revamped]: Error on attribute modification: "generic.attackDamage" is not a valid attribute [14:38:57] [Server thread/WARN] [FML]: * at de.lellson.roughmobs2.RoughMobs.logError(RoughMobs.java:67) [14:38:57] [Server thread/WARN] [FML]: * at de.lellson.roughmobs2.misc.AttributeHelper.addAttributes(AttributeHelper.java:136) [14:38:57] [Server thread/WARN] [FML]: * at de.lellson.roughmobs2.RoughApplier.onEntitySpawn(RoughApplier.java:142) [14:38:57] [Server thread/WARN] [FML]: * at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1198_RoughApplier_onEntitySpawn_EntityJoinWorldEvent.invoke(.dynamic)

This is not your mod's fault, of course, but my own for having modified an incompatible or nonexisting attribute. But having the entity id/class/name output in console would allow me to realize "Ah, X mod's mob does not support attackDamage modification", and I can address the source of the spam.

p1ut0nium-git commented 4 years ago

Ok this helps. I'll look into it.

p1ut0nium-git commented 4 years ago

I've added the entity as output on the error. This is now in version 2.3.12. Hopefully this works for you. If not let me know.