Resolve merge conflicts
This commit is contained in:
commit
17161fd576
@ -75,7 +75,7 @@ public class GoalRunAway implements Goal {
|
||||
}
|
||||
min = -min;
|
||||
if (maintainY.isPresent()) {
|
||||
min = min * 0.5 + GoalYLevel.calculate(maintainY.get(), y);
|
||||
min = min * 0.6 + GoalYLevel.calculate(maintainY.get(), y) * 1.5;
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public class WorldProvider implements IWorldProvider, Helper {
|
||||
* @param dimension The ID of the world's dimension
|
||||
*/
|
||||
public final void initWorld(int dimension) {
|
||||
// Fight me @leijurv
|
||||
File directory, readme;
|
||||
File directory;
|
||||
File readme;
|
||||
|
||||
IntegratedServer integratedServer = mc.getIntegratedServer();
|
||||
|
||||
|
@ -57,8 +57,6 @@ public abstract class Movement implements IMovement, Helper, MovementHelper {
|
||||
*/
|
||||
protected final BetterBlockPos positionToPlace;
|
||||
|
||||
private boolean didBreakLastTick;
|
||||
|
||||
private Double cost;
|
||||
|
||||
public List<BlockPos> toBreakCached = null;
|
||||
|
@ -65,16 +65,17 @@ public class MovementFall extends Movement {
|
||||
}
|
||||
|
||||
BlockPos playerFeet = ctx.playerFeet();
|
||||
Rotation toDest = RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest));
|
||||
Rotation targetRotation = null;
|
||||
if (!MovementHelper.isWater(ctx, dest) && src.getY() - dest.getY() > Baritone.settings().maxFallHeightNoWater.get() && !playerFeet.equals(dest)) {
|
||||
if (!InventoryPlayer.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().provider.isNether()) {
|
||||
return state.setStatus(MovementStatus.UNREACHABLE);
|
||||
}
|
||||
|
||||
if (ctx.player().posY - dest.getY() < ctx.playerController().getBlockReachDistance()) {
|
||||
if (ctx.player().posY - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().onGround) {
|
||||
ctx.player().inventory.currentItem = ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER);
|
||||
|
||||
targetRotation = new Rotation(ctx.player().rotationYaw, 90.0F);
|
||||
targetRotation = new Rotation(toDest.getYaw(), 90.0F);
|
||||
|
||||
RayTraceResult trace = mc.objectMouseOver;
|
||||
if (trace != null && trace.typeOfHit == RayTraceResult.Type.BLOCK && ctx.player().rotationPitch > 89.0F) {
|
||||
@ -85,7 +86,7 @@ public class MovementFall extends Movement {
|
||||
if (targetRotation != null) {
|
||||
state.setTarget(new MovementTarget(targetRotation, true));
|
||||
} else {
|
||||
state.setTarget(new MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest)), false));
|
||||
state.setTarget(new MovementTarget(toDest, false));
|
||||
}
|
||||
if (playerFeet.equals(dest) && (ctx.player().posY - playerFeet.getY() < 0.094 || MovementHelper.isWater(ctx, dest))) { // 0.094 because lilypads
|
||||
if (MovementHelper.isWater(ctx, dest)) {
|
||||
|
@ -193,8 +193,7 @@ public class MovementPillar extends Movement {
|
||||
return state.setStatus(MovementStatus.UNREACHABLE);
|
||||
}
|
||||
|
||||
// If our Y coordinate is above our goal, stop jumping
|
||||
state.setInput(Input.JUMP, ctx.player().posY < dest.getY());
|
||||
|
||||
state.setInput(Input.SNEAK, ctx.player().posY > dest.getY()); // delay placement by 1 tick for ncp compatibility
|
||||
// since (lower down) we only right click once player.isSneaking, and that happens the tick after we request to sneak
|
||||
|
||||
@ -210,6 +209,9 @@ public class MovementPillar extends Movement {
|
||||
|
||||
// revise our target to both yaw and pitch if we're going to be moving forward
|
||||
state.setTarget(new MovementState.MovementTarget(rotation, true));
|
||||
} else {
|
||||
// If our Y coordinate is above our goal, stop jumping
|
||||
state.setInput(Input.JUMP, ctx.player().posY < dest.getY());
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,10 +79,7 @@ public final class FollowProcess extends BaritoneProcessHelper implements IFollo
|
||||
if (entity.equals(ctx.player())) {
|
||||
return false;
|
||||
}
|
||||
if (!ctx.world().loadedEntityList.contains(entity) && !ctx.world().playerEntities.contains(entity)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return ctx.world().loadedEntityList.contains(entity) || ctx.world().playerEntities.contains(entity);
|
||||
}
|
||||
|
||||
private void scanWorld() {
|
||||
|
@ -38,15 +38,15 @@ import java.util.Map;
|
||||
*/
|
||||
public final class InputOverrideHandler extends Behavior implements IInputOverrideHandler {
|
||||
|
||||
public InputOverrideHandler(Baritone baritone) {
|
||||
super(baritone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps inputs to whether or not we are forcing their state down.
|
||||
*/
|
||||
private final Map<Input, Boolean> inputForceStateMap = new HashMap<>();
|
||||
|
||||
public InputOverrideHandler(Baritone baritone) {
|
||||
super(baritone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not we are forcing down the specified {@link KeyBinding}.
|
||||
*
|
||||
|
@ -22,9 +22,8 @@ import baritone.cache.WorldProvider;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @see WorldProvider
|
||||
*
|
||||
* @author Brady
|
||||
* @see WorldProvider
|
||||
* @since 8/4/2018 11:36 AM
|
||||
*/
|
||||
public interface IAnvilChunkLoader {
|
||||
|
@ -21,9 +21,8 @@ import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.chunk.storage.IChunkLoader;
|
||||
|
||||
/**
|
||||
* @see WorldProvider
|
||||
*
|
||||
* @author Brady
|
||||
* @see WorldProvider
|
||||
* @since 8/4/2018 11:33 AM
|
||||
*/
|
||||
public interface IChunkProviderServer {
|
||||
|
Loading…
Reference in New Issue
Block a user