From b498bff9bddff2cb13a717cf5bdec61c7705ecdf Mon Sep 17 00:00:00 2001 From: asiekierka Date: Tue, 9 Dec 2014 18:17:05 +0100 Subject: [PATCH] fix #2271 and gate slot rcolor rendering bug --- common/buildcraft/core/gui/AdvancedSlot.java | 11 +++++++++++ common/buildcraft/energy/TileEngineIron.java | 3 +++ 2 files changed, 14 insertions(+) diff --git a/common/buildcraft/core/gui/AdvancedSlot.java b/common/buildcraft/core/gui/AdvancedSlot.java index 68f3386c..415144b7 100755 --- a/common/buildcraft/core/gui/AdvancedSlot.java +++ b/common/buildcraft/core/gui/AdvancedSlot.java @@ -8,6 +8,8 @@ */ package buildcraft.core.gui; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.ItemStack; @@ -88,7 +90,16 @@ public abstract class AdvancedSlot { } else if (getIcon() != null) { mc.renderEngine.bindTexture(getTexture()); //System.out.printf("Drawing advanced sprite %s (%d,%d) at %d %d\n", getIcon().getIconName(), getIcon().getOriginX(),getIcon().getOriginY(),cornerX + x, cornerY + y); + + GL11.glDisable(GL11.GL_LIGHTING); // Make sure that render states are reset, an ItemStack can derp them up. + GL11.glEnable(GL11.GL_ALPHA_TEST); + GL11.glEnable(GL11.GL_BLEND); + gui.drawTexturedModelRectFromIcon(cornerX + x, cornerY + y, getIcon(), 16, 16); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glDisable(GL11.GL_BLEND); } } diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index 8b409e86..3b91b31e 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -194,6 +194,9 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan @Override public void updateHeat() { + if (energyStage == EnergyStage.OVERHEAT && heat > MIN_HEAT) { + heat -= COOLDOWN_RATE; + } } @Override