I have isolated the issue in the following line of code:
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(etc)
I'm extremely confused as to why it's artifacting the xp bar, health bar, food bar and armour bar. Here's a portion of my code:
// the main code
public void postInit(FMLPostInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(new MyMod());
}
// MyMod class
public uiCreator;
public MyMod() {
uiCreator = new UICreator();
}
@SubscribeEvent
public void onGui(RenderGameOverlayEvent event) {
uiCreator.Create();
}
// UICreator class
public void Create() {
GlStateManager.scale(1.5, 1.5, 1.5);
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow("MyMod", 2, 2, 0xffffff);
GlStateManager.scale(1 / 1.5, 1 / 1.5, 1 / 1.5);
}
Effectively, the line which is causing the artifacting is Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow("MyMod", 2, 2, 0xffffff);
. I don't understand why. I'm certain it's this line, as removing/commenting out any other portions of code do not fix the artifacting until I comment this line out. I'm extremely confused as to why this is occuring. If anyone has any form of insight, I'd greatly appreciate it