Some logging of texture overrides- also, only unregister if it's an actual ModTextureStatic, not if it's a subclass.

This commit is contained in:
Christian Weeks 2012-05-17 15:39:04 -04:00
parent 1004a3236a
commit abee6d2507
2 changed files with 15 additions and 0 deletions

View file

@ -741,6 +741,7 @@ public class FMLClientHandler implements IFMLSidedHandler
for (OverrideInfo animationOverride : animationSet) {
renderer.func_1066_a(animationOverride.textureFX);
addedTextureFX.add(animationOverride.textureFX);
FMLCommonHandler.instance().getFMLLogger().finer(String.format("Registered texture override %d (%d) on %s (%d)", animationOverride.index, animationOverride.textureFX.field_1126_b, animationOverride.textureFX.getClass().getSimpleName(), animationOverride.textureFX.field_1128_f));
}
for (String fileToOverride : overrideInfo.keySet()) {
@ -751,6 +752,7 @@ public class FMLClientHandler implements IFMLSidedHandler
ModTextureStatic mts=new ModTextureStatic(override.index, 1, override.texture, image);
renderer.func_1066_a(mts);
addedTextureFX.add(mts);
FMLCommonHandler.instance().getFMLLogger().finer(String.format("Registered texture override %d (%d) on %s (%d)", override.index, mts.field_1126_b, override.texture, mts.field_1128_f));
}
catch (IOException e)
{

View file

@ -155,4 +155,17 @@ public class ModTextureStatic extends TextureFX
return tmp;
}
/* (non-Javadoc)
* @see net.minecraft.src.TextureFX#unregister(net.minecraft.src.RenderEngine)
*/
@Override
public boolean unregister(RenderEngine engine)
{
if (this.getClass()==ModTextureStatic.class) {
return super.unregister(engine);
} else {
return false;
}
}
}