Skip to content

Commit

Permalink
Fixed lightmap enabling and disabling.
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonradivoev committed Dec 5, 2015
1 parent 75ccf00 commit 48b8a42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/matteroverdrive/util/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class RenderUtils
private static FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
private static TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
private static RenderItem renderItem = new RenderItem();
private static float lastLightMapX,lastLightMapY;

public static void renderStack(int x, int y, ItemStack stack)
{
Expand Down Expand Up @@ -563,9 +564,16 @@ public static void endDrawinngBlockScreen()

public static void disableLightmap()
{
lastLightMapX = OpenGlHelper.lastBrightnessX;
lastLightMapY = OpenGlHelper.lastBrightnessY;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
}

public static void enableLightmap()
{
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastLightMapX, lastLightMapY);
}

public static void DrawMultilineInfo(List infos,int x,int y, int maxLines,int maxLineWidth,int color)
{
try
Expand Down

0 comments on commit 48b8a42

Please sign in to comment.