Make default for freeLook false because it has issues, meddle around with litematica and waypoints commands
This commit is contained in:
parent
511b07fec5
commit
574cb74397
@ -707,7 +707,7 @@ public final class Settings {
|
|||||||
/**
|
/**
|
||||||
* Move without having to force the client-sided rotations
|
* Move without having to force the client-sided rotations
|
||||||
*/
|
*/
|
||||||
public final Setting<Boolean> freeLook = new Setting<>(true);
|
public final Setting<Boolean> freeLook = new Setting<>(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will cause some minor behavioral differences to ensure that Baritone works on anticheats.
|
* Will cause some minor behavioral differences to ensure that Baritone works on anticheats.
|
||||||
|
@ -57,6 +57,7 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||||||
this.force = force || !Baritone.settings().freeLook.value;
|
this.force = force || !Baritone.settings().freeLook.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: for some reason with freecam on this breaks
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerUpdate(PlayerUpdateEvent event) {
|
public void onPlayerUpdate(PlayerUpdateEvent event) {
|
||||||
if (this.target == null) {
|
if (this.target == null) {
|
||||||
@ -78,10 +79,13 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||||||
|
|
||||||
this.target = null;
|
this.target = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (silent) {
|
if (silent) {
|
||||||
this.lastYaw = ctx.player().rotationYaw;
|
this.lastYaw = ctx.player().rotationYaw;
|
||||||
|
ctx.player().rotationPitch = this.target.getPitch();
|
||||||
ctx.player().rotationYaw = this.target.getYaw();
|
ctx.player().rotationYaw = this.target.getYaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case POST: {
|
case POST: {
|
||||||
@ -116,6 +120,11 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smoothly pans to desired rotation
|
||||||
|
* @param desiredYaw
|
||||||
|
* @param desiredPitch
|
||||||
|
*/
|
||||||
private void lookTo(float desiredYaw, float desiredPitch) {
|
private void lookTo(float desiredYaw, float desiredPitch) {
|
||||||
if (desiredPitch == ctx.player().rotationPitch) {
|
if (desiredPitch == ctx.player().rotationPitch) {
|
||||||
desiredPitch = 0;
|
desiredPitch = 0;
|
||||||
|
@ -44,7 +44,7 @@ public class LitematicaCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
baritone.getBuilderProcess().buildOpenLitematic(schematic);
|
baritone.getBuilderProcess().buildOpenLitematic(schematic);
|
||||||
} catch (IndexOutOfBoundsException e) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
logDirect("Pleas provide a valid index.");
|
logDirect("Please provide a valid index.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ import baritone.api.command.Command;
|
|||||||
import baritone.api.command.argument.IArgConsumer;
|
import baritone.api.command.argument.IArgConsumer;
|
||||||
import baritone.api.command.datatypes.ForWaypoints;
|
import baritone.api.command.datatypes.ForWaypoints;
|
||||||
import baritone.api.command.datatypes.RelativeBlockPos;
|
import baritone.api.command.datatypes.RelativeBlockPos;
|
||||||
import baritone.api.command.exception.CommandException;
|
import baritone.api.command.exception.*;
|
||||||
import baritone.api.command.exception.CommandInvalidStateException;
|
|
||||||
import baritone.api.command.exception.CommandInvalidTypeException;
|
|
||||||
import baritone.api.command.helpers.Paginator;
|
import baritone.api.command.helpers.Paginator;
|
||||||
import baritone.api.command.helpers.TabCompleteHelper;
|
import baritone.api.command.helpers.TabCompleteHelper;
|
||||||
import baritone.api.pathing.goals.Goal;
|
import baritone.api.pathing.goals.Goal;
|
||||||
@ -151,9 +149,11 @@ public class WaypointsCommand extends Command {
|
|||||||
args.requireMax(1);
|
args.requireMax(1);
|
||||||
IWaypoint.Tag tag = IWaypoint.Tag.getByName(args.getString());
|
IWaypoint.Tag tag = IWaypoint.Tag.getByName(args.getString());
|
||||||
IWaypoint[] waypoints = ForWaypoints.getWaypointsByTag(this.baritone, tag);
|
IWaypoint[] waypoints = ForWaypoints.getWaypointsByTag(this.baritone, tag);
|
||||||
|
|
||||||
for (IWaypoint waypoint : waypoints) {
|
for (IWaypoint waypoint : waypoints) {
|
||||||
ForWaypoints.waypoints(this.baritone).removeWaypoint(waypoint);
|
ForWaypoints.waypoints(this.baritone).removeWaypoint(waypoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
deletedWaypoints.computeIfAbsent(baritone.getWorldProvider().getCurrentWorld(), k -> new ArrayList<>()).addAll(Arrays.<IWaypoint>asList(waypoints));
|
deletedWaypoints.computeIfAbsent(baritone.getWorldProvider().getCurrentWorld(), k -> new ArrayList<>()).addAll(Arrays.<IWaypoint>asList(waypoints));
|
||||||
ITextComponent textComponent = new TextComponentString(String.format("Cleared %d waypoints, click to restore them", waypoints.length));
|
ITextComponent textComponent = new TextComponentString(String.format("Cleared %d waypoints, click to restore them", waypoints.length));
|
||||||
textComponent.getStyle().setClickEvent(new ClickEvent(
|
textComponent.getStyle().setClickEvent(new ClickEvent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user