GUI fixes
This commit is contained in:
parent
f78b16293f
commit
a003656419
15 changed files with 59 additions and 110 deletions
|
@ -48,7 +48,7 @@ public class GuiAlloyFurnace extends GuiContainer {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(GuiAlloyFurnace.texture);
|
||||
final int k = (this.width - this.xSize) / 2;
|
||||
final int l = (this.height - this.ySize) / 2;
|
||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.client.gui;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
@ -61,21 +60,16 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
RenderItem itemRenderer = Minecraft.getInstance().getRenderItem();
|
||||
itemRenderer.renderItemAndEffectIntoGUI(stack, x, y);
|
||||
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, x, y);
|
||||
GlStateManager.disableLighting();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.color(1, 1, 1, 1F / 3F);
|
||||
GlStateManager.disableDepthTest();
|
||||
GlStateManager.color4f(1, 1, 1, 1F / 3F);
|
||||
drawRect(x - 4, y- 4, x + 20, y + 20, -2139062144);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.enableDepthTest();
|
||||
GlStateManager.color4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiBatbox extends GuiBase {
|
|||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.6, 0.6, 5);
|
||||
GlStateManager.scaled(0.6, 0.6, 5);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
this.hasMultiBlock = this.tile.getCachedHeat() != 0;
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final GuiBase.Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
|
|
@ -70,7 +70,7 @@ public class GuiChunkLoader extends GuiContainer {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(GuiChunkLoader.texture);
|
||||
final int k = (this.width - this.xSize) / 2;
|
||||
final int l = (this.height - this.ySize) / 2;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
@ -45,8 +44,8 @@ public class GuiDestructoPack extends GuiContainer {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(texture);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class GuiDistillationTower extends GuiBase {
|
|||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final GuiBase.Layer layer = Layer.BACKGROUND;
|
||||
// Battery slot
|
||||
drawSlot(8, 72, layer);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiIDSU extends GuiBase {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.6, 0.6, 1);
|
||||
GlStateManager.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) idsu.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) idsu.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class GuiImplosionCompressor extends GuiBase {
|
|||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final GuiBase.Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class GuiIronFurnace extends GuiBase {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
drawDefaultBackground();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
builder.drawSlotTab(this, guiLeft - 24, guiTop + 6, new ItemStack(TRContent.WRENCH));
|
||||
mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
|
||||
final int k = (this.width - xSize) / 2;
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiLESU extends GuiBase {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.6, 0.6, 1);
|
||||
GlStateManager.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/"
|
||||
+ PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " "
|
||||
+ PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class GuiMFE extends GuiBase {
|
|||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.6, 0.6, 1);
|
||||
GlStateManager.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiMFSU extends GuiBase {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.6, 0.6, 1);
|
||||
GlStateManager.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue