[Change] Updated Mappings
This commit is contained in:
@@ -380,7 +380,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||
public BetterBlockPos pathStart() { // TODO move to a helper or util class
|
||||
BetterBlockPos feet = ctx.playerFeet();
|
||||
if (!MovementHelper.canWalkOn(ctx, feet.down())) {
|
||||
if (ctx.player().func_233570_aj_()) {
|
||||
if (ctx.player().isOnGround()) {
|
||||
double playerX = ctx.player().getPositionVec().x;
|
||||
double playerZ = ctx.player().getPositionVec().z;
|
||||
ArrayList<BetterBlockPos> closest = new ArrayList<>();
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ExampleBaritoneControl implements Helper, AbstractGameEventListener
|
||||
String msg = command + rest;
|
||||
String toDisplay = settings.censorRanCommands.value ? command + " ..." : msg;
|
||||
TextComponent component = new StringTextComponent(String.format("> %s", toDisplay));
|
||||
component.func_230530_a_(component.getStyle()
|
||||
component.setStyle(component.getStyle()
|
||||
.setFormatting(TextFormatting.WHITE)
|
||||
.setHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT,
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ChestsCommand extends Command {
|
||||
logDirect(pos.toString());
|
||||
for (ItemStack item : inv.getContents()) {
|
||||
IFormattableTextComponent component = (IFormattableTextComponent) item.getTextComponent();
|
||||
component.func_240702_b_(String.format(" x %d", item.getCount()));
|
||||
component.appendString(String.format(" x %d", item.getCount()));
|
||||
logDirect(component);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ComeCommand extends Command {
|
||||
if (entity == null) {
|
||||
throw new CommandInvalidStateException("render view entity is null");
|
||||
}
|
||||
baritone.getCustomGoalProcess().setGoalAndPath(new GoalBlock(entity.func_233580_cy_()));
|
||||
baritone.getCustomGoalProcess().setGoalAndPath(new GoalBlock(entity.getPosition()));
|
||||
logDirect("Coming");
|
||||
}
|
||||
|
||||
|
||||
@@ -59,19 +59,19 @@ public class HelpCommand extends Command {
|
||||
String names = String.join("/", command.getNames());
|
||||
String name = command.getNames().get(0);
|
||||
TextComponent shortDescComponent = new StringTextComponent(" - " + command.getShortDesc());
|
||||
shortDescComponent.func_230530_a_(shortDescComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
shortDescComponent.setStyle(shortDescComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
TextComponent namesComponent = new StringTextComponent(names);
|
||||
namesComponent.func_230530_a_(namesComponent.getStyle().setFormatting(TextFormatting.WHITE));
|
||||
namesComponent.setStyle(namesComponent.getStyle().setFormatting(TextFormatting.WHITE));
|
||||
TextComponent hoverComponent = new StringTextComponent("");
|
||||
hoverComponent.func_230530_a_(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
hoverComponent.func_230529_a_(namesComponent);
|
||||
hoverComponent.func_240702_b_("\n" + command.getShortDesc());
|
||||
hoverComponent.func_240702_b_("\n\nClick to view full help");
|
||||
hoverComponent.setStyle(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
hoverComponent.append(namesComponent);
|
||||
hoverComponent.appendString("\n" + command.getShortDesc());
|
||||
hoverComponent.appendString("\n\nClick to view full help");
|
||||
String clickCommand = FORCE_COMMAND_PREFIX + String.format("%s %s", label, command.getNames().get(0));
|
||||
TextComponent component = new StringTextComponent(name);
|
||||
component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.func_230529_a_(shortDescComponent);
|
||||
component.func_230530_a_(component.getStyle()
|
||||
component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.append(shortDescComponent);
|
||||
component.setStyle(component.getStyle()
|
||||
.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent))
|
||||
.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, clickCommand)));
|
||||
return component;
|
||||
@@ -89,7 +89,7 @@ public class HelpCommand extends Command {
|
||||
command.getLongDesc().forEach(this::logDirect);
|
||||
logDirect("");
|
||||
TextComponent returnComponent = new StringTextComponent("Click to return to the help menu");
|
||||
returnComponent.func_230530_a_(returnComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
returnComponent.setStyle(returnComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
ClickEvent.Action.RUN_COMMAND,
|
||||
FORCE_COMMAND_PREFIX + label
|
||||
)));
|
||||
|
||||
@@ -83,7 +83,7 @@ public class SelCommand extends Command {
|
||||
if (action == Action.POS2 && pos1 == null) {
|
||||
throw new CommandInvalidStateException("Set pos1 first before using pos2");
|
||||
}
|
||||
BetterBlockPos playerPos = mc.getRenderViewEntity() != null ? BetterBlockPos.from(mc.getRenderViewEntity().func_233580_cy_()) : ctx.playerFeet();
|
||||
BetterBlockPos playerPos = mc.getRenderViewEntity() != null ? BetterBlockPos.from(mc.getRenderViewEntity().getPosition()) : ctx.playerFeet();
|
||||
BetterBlockPos pos = args.hasAny() ? args.getDatatypePost(RelativeBlockPos.INSTANCE, playerPos) : playerPos;
|
||||
args.requireMax(0);
|
||||
if (action == Action.POS1) {
|
||||
|
||||
@@ -82,17 +82,17 @@ public class SetCommand extends Command {
|
||||
" (%s)",
|
||||
settingTypeToString(setting)
|
||||
));
|
||||
typeComponent.func_230530_a_(typeComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
typeComponent.setStyle(typeComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
TextComponent hoverComponent = new StringTextComponent("");
|
||||
hoverComponent.func_230530_a_(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
hoverComponent.func_240702_b_(setting.getName());
|
||||
hoverComponent.func_240702_b_(String.format("\nType: %s", settingTypeToString(setting)));
|
||||
hoverComponent.func_240702_b_(String.format("\n\nValue:\n%s", settingValueToString(setting)));
|
||||
hoverComponent.setStyle(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
hoverComponent.appendString(setting.getName());
|
||||
hoverComponent.appendString(String.format("\nType: %s", settingTypeToString(setting)));
|
||||
hoverComponent.appendString(String.format("\n\nValue:\n%s", settingValueToString(setting)));
|
||||
String commandSuggestion = Baritone.settings().prefix.value + String.format("set %s ", setting.getName());
|
||||
TextComponent component = new StringTextComponent(setting.getName());
|
||||
component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.func_230529_a_(typeComponent);
|
||||
component.func_230530_a_(component.getStyle()
|
||||
component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.append(typeComponent);
|
||||
component.setStyle(component.getStyle()
|
||||
.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent))
|
||||
.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, commandSuggestion)));
|
||||
return component;
|
||||
@@ -164,7 +164,7 @@ public class SetCommand extends Command {
|
||||
));
|
||||
}
|
||||
TextComponent oldValueComponent = new StringTextComponent(String.format("Old value: %s", oldValue));
|
||||
oldValueComponent.func_230530_a_(oldValueComponent.getStyle()
|
||||
oldValueComponent.setStyle(oldValueComponent.getStyle()
|
||||
.setFormatting(TextFormatting.GRAY)
|
||||
.setHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT,
|
||||
|
||||
@@ -61,16 +61,16 @@ public class WaypointsCommand extends Command {
|
||||
BiFunction<IWaypoint, Action, ITextComponent> toComponent = (waypoint, _action) -> {
|
||||
TextComponent component = new StringTextComponent("");
|
||||
TextComponent tagComponent = new StringTextComponent(waypoint.getTag().name() + " ");
|
||||
tagComponent.func_230530_a_(tagComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
tagComponent.setStyle(tagComponent.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
String name = waypoint.getName();
|
||||
TextComponent nameComponent = new StringTextComponent(!name.isEmpty() ? name : "<empty>");
|
||||
nameComponent.func_230530_a_(nameComponent.getStyle().setFormatting(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY));
|
||||
nameComponent.setStyle(nameComponent.getStyle().setFormatting(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY));
|
||||
TextComponent timestamp = new StringTextComponent(" @ " + new Date(waypoint.getCreationTimestamp()));
|
||||
timestamp.func_230530_a_(timestamp.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
component.func_230529_a_(tagComponent);
|
||||
component.func_230529_a_(nameComponent);
|
||||
component.func_230529_a_(timestamp);
|
||||
component.func_230530_a_(component.getStyle()
|
||||
timestamp.setStyle(timestamp.getStyle().setFormatting(TextFormatting.DARK_GRAY));
|
||||
component.append(tagComponent);
|
||||
component.append(nameComponent);
|
||||
component.append(timestamp);
|
||||
component.setStyle(component.getStyle()
|
||||
.setHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT,
|
||||
new StringTextComponent("Click to select")
|
||||
@@ -138,8 +138,8 @@ public class WaypointsCommand extends Command {
|
||||
IWaypoint waypoint = new Waypoint(name, tag, pos);
|
||||
ForWaypoints.waypoints(this.baritone).addWaypoint(waypoint);
|
||||
TextComponent component = new StringTextComponent("Waypoint added: ");
|
||||
component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.func_230529_a_(toComponent.apply(waypoint, Action.INFO));
|
||||
component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY));
|
||||
component.append(toComponent.apply(waypoint, Action.INFO));
|
||||
logDirect(component);
|
||||
} else if (action == Action.CLEAR) {
|
||||
args.requireMax(1);
|
||||
@@ -196,7 +196,7 @@ public class WaypointsCommand extends Command {
|
||||
logDirect(transform.apply(waypoint));
|
||||
logDirect(String.format("Position: %s", waypoint.getLocation()));
|
||||
TextComponent deleteComponent = new StringTextComponent("Click to delete this waypoint");
|
||||
deleteComponent.func_230530_a_(deleteComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
deleteComponent.setStyle(deleteComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
ClickEvent.Action.RUN_COMMAND,
|
||||
String.format(
|
||||
"%s%s delete %s @ %d",
|
||||
@@ -207,7 +207,7 @@ public class WaypointsCommand extends Command {
|
||||
)
|
||||
)));
|
||||
TextComponent goalComponent = new StringTextComponent("Click to set goal to this waypoint");
|
||||
goalComponent.func_230530_a_(goalComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
goalComponent.setStyle(goalComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
ClickEvent.Action.RUN_COMMAND,
|
||||
String.format(
|
||||
"%s%s goal %s @ %d",
|
||||
@@ -218,7 +218,7 @@ public class WaypointsCommand extends Command {
|
||||
)
|
||||
)));
|
||||
TextComponent backComponent = new StringTextComponent("Click to return to the waypoints list");
|
||||
backComponent.func_230530_a_(backComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
backComponent.setStyle(backComponent.getStyle().setClickEvent(new ClickEvent(
|
||||
ClickEvent.Action.RUN_COMMAND,
|
||||
String.format(
|
||||
"%s%s list",
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CalculationContext {
|
||||
this.bsi = new BlockStateInterface(world, worldData, forUseOnAnotherThread);
|
||||
this.toolSet = new ToolSet(player);
|
||||
this.hasThrowaway = Baritone.settings().allowPlace.value && ((Baritone) baritone).getInventoryBehavior().hasGenericThrowaway();
|
||||
this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.value && PlayerInventory.isHotbar(player.inventory.getSlotFor(STACK_BUCKET_WATER)) && world.func_234922_V_() != DimensionType.field_236000_d_;
|
||||
this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.value && PlayerInventory.isHotbar(player.inventory.getSlotFor(STACK_BUCKET_WATER)) && world.func_234922_V_() != DimensionType.THE_NETHER;
|
||||
this.canSprint = Baritone.settings().allowSprint.value && player.getFoodStats().getFoodLevel() > 6;
|
||||
this.placeBlockCost = Baritone.settings().blockPlacementPenalty.value;
|
||||
this.allowBreak = Baritone.settings().allowBreak.value;
|
||||
|
||||
@@ -97,11 +97,11 @@ public class MovementFall extends Movement {
|
||||
Block destBlock = destState.getBlock();
|
||||
boolean isWater = destState.getFluidState().getFluid() instanceof WaterFluid;
|
||||
if (!isWater && willPlaceBucket() && !playerFeet.equals(dest)) {
|
||||
if (!PlayerInventory.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().func_234922_V_() == DimensionType.field_236000_d_) {
|
||||
if (!PlayerInventory.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().func_234922_V_() == DimensionType.THE_NETHER) {
|
||||
return state.setStatus(MovementStatus.UNREACHABLE);
|
||||
}
|
||||
|
||||
if (ctx.player().getPositionVec().y - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().func_233570_aj_()) {
|
||||
if (ctx.player().getPositionVec().y - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().isOnGround()) {
|
||||
ctx.player().inventory.currentItem = ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER);
|
||||
|
||||
targetRotation = new Rotation(toDest.getYaw(), 90.0F);
|
||||
@@ -136,7 +136,7 @@ public class MovementFall extends Movement {
|
||||
}
|
||||
Vector3d destCenter = VecUtils.getBlockPosCenter(dest); // we are moving to the 0.5 center not the edge (like if we were falling on a ladder)
|
||||
if (Math.abs(ctx.player().getPositionVec().x + ctx.player().getMotion().x - destCenter.x) > 0.1 || Math.abs(ctx.player().getPositionVec().z + ctx.player().getMotion().z - destCenter.z) > 0.1) {
|
||||
if (!ctx.player().func_233570_aj_() && Math.abs(ctx.player().getMotion().y) > 0.4) {
|
||||
if (!ctx.player().isOnGround() && Math.abs(ctx.player().getMotion().y) > 0.4) {
|
||||
state.setInput(Input.SNEAK, true);
|
||||
}
|
||||
state.setInput(Input.MOVE_FORWARD, true);
|
||||
@@ -148,7 +148,7 @@ public class MovementFall extends Movement {
|
||||
double dist = Math.abs(avoid.getX() * (destCenter.x - avoid.getX() / 2.0 - ctx.player().getPositionVec().x)) + Math.abs(avoid.getZ() * (destCenter.z - avoid.getZ() / 2.0 - ctx.player().getPositionVec().z));
|
||||
if (dist < 0.6) {
|
||||
state.setInput(Input.MOVE_FORWARD, true);
|
||||
} else if (!ctx.player().func_233570_aj_()) {
|
||||
} else if (!ctx.player().isOnGround()) {
|
||||
state.setInput(Input.SNEAK, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class MovementParkour extends Movement {
|
||||
}
|
||||
} else if (!ctx.playerFeet().equals(src)) {
|
||||
if (ctx.playerFeet().equals(src.offset(direction)) || ctx.player().getPositionVec().y - src.y > 0.0001) {
|
||||
if (!MovementHelper.canWalkOn(ctx, dest.down()) && !ctx.player().func_233570_aj_() && MovementHelper.attemptToPlaceABlock(state, baritone, dest.down(), true, false) == PlaceResult.READY_TO_PLACE) {
|
||||
if (!MovementHelper.canWalkOn(ctx, dest.down()) && !ctx.player().isOnGround() && MovementHelper.attemptToPlaceABlock(state, baritone, dest.down(), true, false) == PlaceResult.READY_TO_PLACE) {
|
||||
// go in the opposite order to check DOWN before all horizontals -- down is preferable because you don't have to look to the side while in midair, which could mess up the trajectory
|
||||
state.setInput(Input.CLICK_RIGHT, true);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class MovementTraverse extends Movement {
|
||||
}
|
||||
Block low = BlockStateInterface.get(ctx, src).getBlock();
|
||||
Block high = BlockStateInterface.get(ctx, src.up()).getBlock();
|
||||
if (ctx.player().getPositionVec().y > src.y + 0.1D && !ctx.player().func_233570_aj_() && (low == Blocks.VINE || low == Blocks.LADDER || high == Blocks.VINE || high == Blocks.LADDER)) {
|
||||
if (ctx.player().getPositionVec().y > src.y + 0.1D && !ctx.player().isOnGround() && (low == Blocks.VINE || low == Blocks.LADDER || high == Blocks.VINE || high == Blocks.LADDER)) {
|
||||
// hitting W could cause us to climb the ladder instead of going forward
|
||||
// wait until we're on the ground
|
||||
return state;
|
||||
|
||||
@@ -274,7 +274,7 @@ public class PathExecutor implements IPathExecutor, Helper {
|
||||
if (!current.isPresent()) {
|
||||
return false;
|
||||
}
|
||||
if (!ctx.player().func_233570_aj_()) {
|
||||
if (!ctx.player().isOnGround()) {
|
||||
return false;
|
||||
}
|
||||
if (!MovementHelper.canWalkOn(ctx, ctx.playerFeet().down())) {
|
||||
@@ -323,7 +323,7 @@ public class PathExecutor implements IPathExecutor, Helper {
|
||||
* @return Whether or not it was possible to snap to the current player feet
|
||||
*/
|
||||
public boolean snipsnapifpossible() {
|
||||
if (!ctx.player().func_233570_aj_() && ctx.world().getFluidState(ctx.playerFeet()).isEmpty()) {
|
||||
if (!ctx.player().isOnGround() && ctx.world().getFluidState(ctx.playerFeet()).isEmpty()) {
|
||||
// if we're falling in the air, and not in water, don't splice
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -438,7 +438,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
Optional<Tuple<BetterBlockPos, Rotation>> toBreak = toBreakNearPlayer(bcc);
|
||||
if (toBreak.isPresent() && isSafeToCancel && ctx.player().func_233570_aj_()) {
|
||||
if (toBreak.isPresent() && isSafeToCancel && ctx.player().isOnGround()) {
|
||||
// we'd like to pause to break this block
|
||||
// only change look direction if it's safe (don't want to fuck up an in progress parkour for example
|
||||
Rotation rot = toBreak.get().getB();
|
||||
@@ -458,7 +458,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
List<BlockState> desirableOnHotbar = new ArrayList<>();
|
||||
Optional<Placement> toPlace = searchForPlacables(bcc, desirableOnHotbar);
|
||||
if (toPlace.isPresent() && isSafeToCancel && ctx.player().func_233570_aj_() && ticks <= 0) {
|
||||
if (toPlace.isPresent() && isSafeToCancel && ctx.player().isOnGround() && ticks <= 0) {
|
||||
Rotation rot = toPlace.get().rot;
|
||||
baritone.getLookBehavior().updateTarget(rot, true);
|
||||
ctx.player().inventory.currentItem = toPlace.get().hotbarSelection;
|
||||
@@ -523,7 +523,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
|
||||
private void trim() {
|
||||
HashSet<BetterBlockPos> copy = new HashSet<>(incorrectPositions);
|
||||
copy.removeIf(pos -> pos.distanceSq(ctx.player().func_233580_cy_()) > 200);
|
||||
copy.removeIf(pos -> pos.distanceSq(ctx.player().getPosition()) > 200);
|
||||
if (!copy.isEmpty()) {
|
||||
incorrectPositions = copy;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
||||
}
|
||||
}
|
||||
for (Entity entity : ctx.entities()) {
|
||||
if (entity instanceof ItemEntity && entity.func_233570_aj_()) {
|
||||
if (entity instanceof ItemEntity && entity.isOnGround()) {
|
||||
ItemEntity ei = (ItemEntity) entity;
|
||||
if (PICKUP_DROPPED.contains(ei.getItem().getItem())) {
|
||||
// +0.1 because of farmland's 0.9375 dummy height lol
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class FollowProcess extends BaritoneProcessHelper implements IFollo
|
||||
private Goal towards(Entity following) {
|
||||
BlockPos pos;
|
||||
if (Baritone.settings().followOffsetDistance.value == 0) {
|
||||
pos = following.func_233580_cy_();
|
||||
pos = following.getPosition();
|
||||
} else {
|
||||
GoalXZ g = GoalXZ.fromDirection(following.getPositionVec(), Baritone.settings().followOffsetDirection.value, Baritone.settings().followOffsetDistance.value);
|
||||
pos = new BlockPos(g.getX(), following.getPositionVec().y, g.getZ());
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
.filter(pos -> !(BlockStateInterface.get(ctx, pos).getBlock() instanceof AirBlock)) // after breaking a block, it takes mineGoalUpdateInterval ticks for it to actually update this list =(
|
||||
.min(Comparator.comparingDouble(ctx.playerFeet()::distanceSq));
|
||||
baritone.getInputOverrideHandler().clearAllKeys();
|
||||
if (shaft.isPresent() && ctx.player().func_233570_aj_()) {
|
||||
if (shaft.isPresent() && ctx.player().isOnGround()) {
|
||||
BlockPos pos = shaft.get();
|
||||
BlockState state = baritone.bsi.get0(pos);
|
||||
if (!MovementHelper.avoidBreaking(baritone.bsi, pos.getX(), pos.getY(), pos.getZ(), state)) {
|
||||
@@ -308,7 +308,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
if (entity instanceof ItemEntity) {
|
||||
ItemEntity ei = (ItemEntity) entity;
|
||||
if (filter.has(ei.getItem())) {
|
||||
ret.add(entity.func_233580_cy_());
|
||||
ret.add(entity.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
|
||||
.filter(pos -> !blacklist.contains(pos))
|
||||
|
||||
.sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player().func_233580_cy_()::distanceSq))
|
||||
.sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player().getPosition()::distanceSq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (locs.size() > max) {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper {
|
||||
System.out.println("Beginning Baritone automatic test routine");
|
||||
mc.displayGuiScreen(null);
|
||||
WorldSettings worldsettings = new WorldSettings("BaritoneAutoTest", GameType.SURVIVAL, false, Difficulty.NORMAL, true, new GameRules(), DatapackCodec.field_234880_a_);
|
||||
mc.func_238192_a_("BaritoneAutoTest", worldsettings, IDynamicRegistries.func_239770_b_(), DimensionGeneratorSettings.field_236202_b_.func_236220_a_(false, OptionalLong.of(TEST_SEED)));
|
||||
mc.func_238192_a_("BaritoneAutoTest", worldsettings, IDynamicRegistries.func_239770_b_(), DimensionGeneratorSettings.field_236202_b_.create(false, OptionalLong.of(TEST_SEED)));
|
||||
}
|
||||
|
||||
IntegratedServer server = mc.getIntegratedServer();
|
||||
|
||||
@@ -88,7 +88,7 @@ public class GuiClick extends Screen implements Helper {
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().removeAllSelections();
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().addSelection(BetterBlockPos.from(clickStart), BetterBlockPos.from(currentMouseOver));
|
||||
TextComponent component = new StringTextComponent("Selection made! For usage: " + Baritone.settings().prefix.value + "help sel");
|
||||
component.func_230530_a_(component.getStyle()
|
||||
component.setStyle(component.getStyle()
|
||||
.setFormatting(TextFormatting.WHITE)
|
||||
.setClickEvent(new ClickEvent(
|
||||
ClickEvent.Action.RUN_COMMAND,
|
||||
|
||||
@@ -29,7 +29,7 @@ public class PlayerMovementInput extends MovementInput {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_225607_a_(boolean p_225607_1_) {
|
||||
public void tickMovement(boolean p_225607_1_) {
|
||||
this.moveStrafe = 0.0F;
|
||||
this.moveForward = 0.0F;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Avoidance {
|
||||
.filter(entity -> (!(entity instanceof SpiderEntity)) || ctx.player().getBrightness() < 0.5)
|
||||
.filter(entity -> !(entity instanceof ZombifiedPiglinEntity) || ((ZombifiedPiglinEntity) entity).getRevengeTarget() != null)
|
||||
.filter(entity -> !(entity instanceof EndermanEntity) || ((EndermanEntity) entity).isScreaming())
|
||||
.forEach(entity -> res.add(new Avoidance(entity.func_233580_cy_(), mobCoeff, Baritone.settings().mobAvoidanceRadius.value)));
|
||||
.forEach(entity -> res.add(new Avoidance(entity.getPosition(), mobCoeff, Baritone.settings().mobAvoidanceRadius.value)));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user