Fixed the energy bar turning green when holding a redstone torch

This commit is contained in:
Ellpeck 2016-07-22 00:58:39 +02:00
parent 42c04fec90
commit 9140b39f65

View file

@ -22,6 +22,7 @@ import net.minecraft.block.BlockRedstoneTorch;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -180,7 +181,11 @@ public class ClientEvents{
energyDisplay = new EnergyDisplay(0, 0, null); energyDisplay = new EnergyDisplay(0, 0, null);
} }
energyDisplay.setData(2, event.getResolution().getScaledHeight()-96, display.getEnergyStorage(), true, true); energyDisplay.setData(2, event.getResolution().getScaledHeight()-96, display.getEnergyStorage(), true, true);
GlStateManager.pushMatrix();
GlStateManager.color(1F, 1F, 1F, 1F);
energyDisplay.draw(); energyDisplay.draw();
GlStateManager.popMatrix();
profiler.endSection(); profiler.endSection();
} }