mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-19 11:59:21 +00:00
use resolution of the event instead of creating new one
This commit is contained in:
1 parent
ad1aa80b78
commit
90782f5ed1
2 files changed
+3
-9
No files matched your search
+1
-1
@@ -109,7 +109,7 @@ public class ClientEventHandler {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderGameOverlayEvent(final RenderGameOverlayEvent.Post event) {
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.ALL) {
|
||||
statusDisplayManager.drawItemStack();
|
||||
statusDisplayManager.drawItemStack(event.resolution);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-8
@@ -35,22 +35,16 @@ public final class ItemDisplayManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void drawItemStack() {
|
||||
public void drawItemStack(ScaledResolution resolution) {
|
||||
if (ticksCounter > 0 && itemStack != null && itemStack.getItem() != null) {
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
final int y = res.getScaledHeight();
|
||||
|
||||
final int y = resolution.getScaledHeight();
|
||||
GL11.glTranslatef(7.0f, y * 0.25f, 0);
|
||||
|
||||
renderItem.renderItemAndEffectIntoGUI(fontRenderer, textureManager, itemStack, 0, 0);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
Reference in new issue
Block a user