thegamemaster1234
Plantera
How do I log the exception? I don't have much experience with try/catch blocks either.That sounds like an exception is being thrown. Surround with try catch and log the exception.
I came up with this:
Code:
try
{
PlayerDrawInfo info = new PlayerDrawInfo();
color = info.bodyColor;
}
catch(System.Exception e)
{
ErrorLogger.Log(e.ToString());
}
(I removed the Invoke line; turns out it wasn't needed. Behavior is still the same)
EDIT: I built the mod with this code, and everything still works as it is. Since the code is clearly still working, I can't possibly imagine there's even one exception occuring.
However, there's a good possibility that the reason this is happening is because of the method itself. In the documentation, it says that it changes the color of accessories around it too (which is bad. I don't want this.)
It's entirely possible that the body color has a very low alpha, making objects not intended to have that color invisible. Not getting the afterimage, though... possibly another side effect of the alpha change?
So I suppose the real question here is: is it possible to change the color of an armor piece without changing the color of nearby accessories? It feels like it should, since the game already seems to do that with dressers.
Last edited: