From 6900fb2adee0ec035a5cb4d3d1e2a36b68cff9a8 Mon Sep 17 00:00:00 2001 From: Brady Date: Fri, 10 Aug 2018 23:43:23 -0500 Subject: [PATCH] Replace some GL 1.1 calls with GlStateManager calls --- src/main/java/baritone/bot/GameEventHandler.java | 3 +-- src/main/java/baritone/bot/InputOverrideHandler.java | 6 +++--- src/main/java/baritone/bot/utils/PathRenderer.java | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/baritone/bot/GameEventHandler.java b/src/main/java/baritone/bot/GameEventHandler.java index 54ea36e2..e2694a9e 100755 --- a/src/main/java/baritone/bot/GameEventHandler.java +++ b/src/main/java/baritone/bot/GameEventHandler.java @@ -31,7 +31,6 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.settings.KeyBinding; import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; import java.util.function.Consumer; @@ -148,7 +147,7 @@ public final class GameEventHandler implements IGameEventListener, Helper { GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.color(1.0F, 1.0F, 0.0F, 0.4F); - GL11.glLineWidth(2.0F); + GlStateManager.glLineWidth(2.0F); GlStateManager.disableTexture2D(); Tessellator tessellator = Tessellator.getInstance(); diff --git a/src/main/java/baritone/bot/InputOverrideHandler.java b/src/main/java/baritone/bot/InputOverrideHandler.java index c4c967ee..63f3bb39 100755 --- a/src/main/java/baritone/bot/InputOverrideHandler.java +++ b/src/main/java/baritone/bot/InputOverrideHandler.java @@ -25,9 +25,9 @@ import java.util.HashMap; import java.util.Map; /** - * This serves as a replacement to the old {@code MovementManager}'s - * input overriding capabilities. It is vastly more extensible in the - * inputs that can be overriden. + * An interface with the game's control system allowing the ability to + * force down certain controls, having the same effect as if we were actually + * physically forcing down the assigned key. * * @author Brady * @since 7/31/2018 11:20 PM diff --git a/src/main/java/baritone/bot/utils/PathRenderer.java b/src/main/java/baritone/bot/utils/PathRenderer.java index 701093f4..57bd573b 100644 --- a/src/main/java/baritone/bot/utils/PathRenderer.java +++ b/src/main/java/baritone/bot/utils/PathRenderer.java @@ -29,7 +29,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.Collection; @@ -52,7 +51,7 @@ public final class PathRenderer implements Helper { GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO); GlStateManager.color(color.getColorComponents(null)[0], color.getColorComponents(null)[1], color.getColorComponents(null)[2], 0.4F); - GL11.glLineWidth(3.0F); + GlStateManager.glLineWidth(3.0F); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); List positions = path.positions(); @@ -99,7 +98,7 @@ public final class PathRenderer implements Helper { GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.color(color.getColorComponents(null)[0], color.getColorComponents(null)[1], color.getColorComponents(null)[2], 0.4F); - GL11.glLineWidth(5.0F); + GlStateManager.glLineWidth(5.0F); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); float expand = 0.002F;