From 307d6a06284b4d525485c3a0a23df72bc393af02 Mon Sep 17 00:00:00 2001 From: 0x22 <0x22@futureclient.net> Date: Thu, 19 Sep 2019 17:05:15 -0400 Subject: [PATCH] Remove retarded MC field --- src/api/java/baritone/api/utils/command/Command.java | 2 -- .../java/baritone/utils/command/defaults/ComeCommand.java | 2 +- .../baritone/utils/command/defaults/ExploreFilterCommand.java | 2 +- .../java/baritone/utils/command/defaults/RenderCommand.java | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/api/java/baritone/api/utils/command/Command.java b/src/api/java/baritone/api/utils/command/Command.java index 0c982854..6d415865 100644 --- a/src/api/java/baritone/api/utils/command/Command.java +++ b/src/api/java/baritone/api/utils/command/Command.java @@ -23,7 +23,6 @@ import baritone.api.utils.Helper; import baritone.api.utils.IPlayerContext; import baritone.api.utils.command.execution.CommandExecution; import baritone.api.utils.command.helpers.arguments.ArgConsumer; -import net.minecraft.client.Minecraft; import java.util.Collections; import java.util.List; @@ -35,7 +34,6 @@ public abstract class Command implements Helper { protected IBaritone baritone; protected IPlayerContext ctx; - protected Minecraft MC = mc; /** * The names of this command. This is what you put after the command prefix. */ diff --git a/src/main/java/baritone/utils/command/defaults/ComeCommand.java b/src/main/java/baritone/utils/command/defaults/ComeCommand.java index f18d4226..857d8d01 100644 --- a/src/main/java/baritone/utils/command/defaults/ComeCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ComeCommand.java @@ -41,7 +41,7 @@ public class ComeCommand extends Command { @Override protected void executed(String label, ArgConsumer args, Settings settings) { args.requireMax(0); - Entity entity = MC.getRenderViewEntity(); + Entity entity = mc.getRenderViewEntity(); if (isNull(entity)) { throw new CommandInvalidStateException("render view entity is null"); } diff --git a/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java b/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java index 40cf3a6a..64c6335e 100644 --- a/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java +++ b/src/main/java/baritone/utils/command/defaults/ExploreFilterCommand.java @@ -42,7 +42,7 @@ public class ExploreFilterCommand extends Command { @Override protected void executed(String label, ArgConsumer args, Settings settings) { args.requireMax(2); - File file = args.getDatatypePost(RelativeFile.class, MC.gameDir.getAbsoluteFile().getParentFile()); + File file = args.getDatatypePost(RelativeFile.class, mc.gameDir.getAbsoluteFile().getParentFile()); boolean invert = false; if (args.has()) { if (args.getString().equalsIgnoreCase("invert")) { diff --git a/src/main/java/baritone/utils/command/defaults/RenderCommand.java b/src/main/java/baritone/utils/command/defaults/RenderCommand.java index 0dedc398..cc07f477 100644 --- a/src/main/java/baritone/utils/command/defaults/RenderCommand.java +++ b/src/main/java/baritone/utils/command/defaults/RenderCommand.java @@ -38,8 +38,8 @@ public class RenderCommand extends Command { protected void executed(String label, ArgConsumer args, Settings settings) { args.requireMax(0); BetterBlockPos origin = ctx.playerFeet(); - int renderDistance = (MC.gameSettings.renderDistanceChunks + 1) * 16; - MC.renderGlobal.markBlockRangeForRenderUpdate( + int renderDistance = (mc.gameSettings.renderDistanceChunks + 1) * 16; + mc.renderGlobal.markBlockRangeForRenderUpdate( origin.x - renderDistance, 0, origin.z - renderDistance,