This commit is contained in:
Leijurv 2018-11-14 16:39:04 -08:00
parent f5d0143b09
commit 57c0613843
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 5 additions and 9 deletions

View File

@ -36,7 +36,7 @@ import baritone.utils.BaritoneAutoTest;
import baritone.utils.ExampleBaritoneControl;
import baritone.utils.InputOverrideHandler;
import baritone.utils.PathingControlManager;
import baritone.utils.player.LocalPlayerContext;
import baritone.utils.player.PrimaryPlayerContext;
import net.minecraft.client.Minecraft;
import java.io.File;
@ -102,7 +102,7 @@ public class Baritone implements IBaritone {
}
// Define this before behaviors try and get it, or else it will be null and the builds will fail!
this.playerContext = LocalPlayerContext.INSTANCE;
this.playerContext = PrimaryPlayerContext.INSTANCE;
this.behaviors = new ArrayList<>();
{

View File

@ -20,7 +20,7 @@ package baritone.utils.player;
import baritone.api.BaritoneAPI;
import baritone.api.cache.IWorldData;
import baritone.api.utils.IPlayerContext;
import net.minecraft.client.Minecraft;
import baritone.utils.Helper;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.multiplayer.PlayerControllerMP;
import net.minecraft.util.math.RayTraceResult;
@ -32,13 +32,9 @@ import net.minecraft.world.World;
* @author Brady
* @since 11/12/2018
*/
public final class LocalPlayerContext implements IPlayerContext {
public enum PrimaryPlayerContext implements IPlayerContext, Helper {
private static final Minecraft mc = Minecraft.getMinecraft();
public static final LocalPlayerContext INSTANCE = new LocalPlayerContext();
private LocalPlayerContext() {}
INSTANCE;
@Override
public EntityPlayerSP player() {