Merge pull request #950 from 0-x-2-2/commands
Remove retarded MC field.
This commit is contained in:
commit
3c914de690
@ -23,7 +23,6 @@ import baritone.api.utils.Helper;
|
|||||||
import baritone.api.utils.IPlayerContext;
|
import baritone.api.utils.IPlayerContext;
|
||||||
import baritone.api.utils.command.execution.CommandExecution;
|
import baritone.api.utils.command.execution.CommandExecution;
|
||||||
import baritone.api.utils.command.helpers.arguments.ArgConsumer;
|
import baritone.api.utils.command.helpers.arguments.ArgConsumer;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -35,7 +34,6 @@ public abstract class Command implements Helper {
|
|||||||
|
|
||||||
protected IBaritone baritone;
|
protected IBaritone baritone;
|
||||||
protected IPlayerContext ctx;
|
protected IPlayerContext ctx;
|
||||||
protected Minecraft MC = mc;
|
|
||||||
/**
|
/**
|
||||||
* The names of this command. This is what you put after the command prefix.
|
* The names of this command. This is what you put after the command prefix.
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ public class ComeCommand extends Command {
|
|||||||
@Override
|
@Override
|
||||||
protected void executed(String label, ArgConsumer args, Settings settings) {
|
protected void executed(String label, ArgConsumer args, Settings settings) {
|
||||||
args.requireMax(0);
|
args.requireMax(0);
|
||||||
Entity entity = MC.getRenderViewEntity();
|
Entity entity = mc.getRenderViewEntity();
|
||||||
if (isNull(entity)) {
|
if (isNull(entity)) {
|
||||||
throw new CommandInvalidStateException("render view entity is null");
|
throw new CommandInvalidStateException("render view entity is null");
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class ExploreFilterCommand extends Command {
|
|||||||
@Override
|
@Override
|
||||||
protected void executed(String label, ArgConsumer args, Settings settings) {
|
protected void executed(String label, ArgConsumer args, Settings settings) {
|
||||||
args.requireMax(2);
|
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;
|
boolean invert = false;
|
||||||
if (args.has()) {
|
if (args.has()) {
|
||||||
if (args.getString().equalsIgnoreCase("invert")) {
|
if (args.getString().equalsIgnoreCase("invert")) {
|
||||||
|
@ -38,8 +38,8 @@ public class RenderCommand extends Command {
|
|||||||
protected void executed(String label, ArgConsumer args, Settings settings) {
|
protected void executed(String label, ArgConsumer args, Settings settings) {
|
||||||
args.requireMax(0);
|
args.requireMax(0);
|
||||||
BetterBlockPos origin = ctx.playerFeet();
|
BetterBlockPos origin = ctx.playerFeet();
|
||||||
int renderDistance = (MC.gameSettings.renderDistanceChunks + 1) * 16;
|
int renderDistance = (mc.gameSettings.renderDistanceChunks + 1) * 16;
|
||||||
MC.renderGlobal.markBlockRangeForRenderUpdate(
|
mc.renderGlobal.markBlockRangeForRenderUpdate(
|
||||||
origin.x - renderDistance,
|
origin.x - renderDistance,
|
||||||
0,
|
0,
|
||||||
origin.z - renderDistance,
|
origin.z - renderDistance,
|
||||||
|
Loading…
Reference in New Issue
Block a user