Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c72eb3e195 | ||
|
|
a4237bf1f9 | ||
|
|
e767e34b92 |
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
group 'baritone'
|
||||
version '1.2.2'
|
||||
version '1.2.3'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
|
||||
@@ -202,7 +202,8 @@ public class MovementDescend extends Movement {
|
||||
}
|
||||
|
||||
BlockPos playerFeet = ctx.playerFeet();
|
||||
if (playerFeet.equals(dest) && (MovementHelper.isLiquid(ctx, dest) || ctx.player().posY - playerFeet.getY() < 0.094)) { // lilypads
|
||||
BlockPos fakeDest = new BlockPos(dest.getX() * 2 - src.getX(), dest.getY(), dest.getZ() * 2 - src.getZ());
|
||||
if ((playerFeet.equals(dest) || playerFeet.equals(fakeDest)) && (MovementHelper.isLiquid(ctx, dest) || ctx.player().posY - dest.getY() < 0.5)) { // lilypads
|
||||
// Wait until we're actually on the ground before saying we're done because sometimes we continue to fall if the next action starts immediately
|
||||
return state.setStatus(MovementStatus.SUCCESS);
|
||||
/* else {
|
||||
@@ -228,12 +229,8 @@ public class MovementDescend extends Movement {
|
||||
double z = ctx.player().posZ - (src.getZ() + 0.5);
|
||||
double fromStart = Math.sqrt(x * x + z * z);
|
||||
if (!playerFeet.equals(dest) || ab > 0.25) {
|
||||
BlockPos fakeDest = new BlockPos(dest.getX() * 2 - src.getX(), dest.getY(), dest.getZ() * 2 - src.getZ());
|
||||
if (numTicks++ < 20) {
|
||||
if (numTicks++ < 20 && fromStart < 1.25) {
|
||||
MovementHelper.moveTowards(ctx, state, fakeDest);
|
||||
if (fromStart > 1.25) {
|
||||
state.getTarget().rotation = new Rotation(state.getTarget().rotation.getYaw() + 180F, state.getTarget().rotation.getPitch());
|
||||
}
|
||||
} else {
|
||||
MovementHelper.moveTowards(ctx, state, dest);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import baritone.Baritone;
|
||||
import baritone.api.utils.IPlayerContext;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
|
||||
public class BlockPlaceHelper implements Helper {
|
||||
@@ -38,13 +37,12 @@ public class BlockPlaceHelper implements Helper {
|
||||
return;
|
||||
}
|
||||
RayTraceResult mouseOver = ctx.objectMouseOver();
|
||||
BlockPos pos = mouseOver.getBlockPos();
|
||||
if (!rightClickRequested || ctx.player().isRowingBoat() || pos == null || mouseOver.typeOfHit != RayTraceResult.Type.BLOCK) {
|
||||
if (!rightClickRequested || ctx.player().isRowingBoat() || mouseOver == null || mouseOver.getBlockPos() == null || mouseOver.typeOfHit != RayTraceResult.Type.BLOCK) {
|
||||
return;
|
||||
}
|
||||
rightClickTimer = Baritone.settings().rightClickSpeed.get();
|
||||
for (EnumHand hand : EnumHand.values()) {
|
||||
if (ctx.playerController().processRightClickBlock(ctx.player(), ctx.world(), pos, mouseOver.sideHit, mouseOver.hitVec, hand) == EnumActionResult.SUCCESS) {
|
||||
if (ctx.playerController().processRightClickBlock(ctx.player(), ctx.world(), mouseOver.getBlockPos(), mouseOver.sideHit, mouseOver.hitVec, hand) == EnumActionResult.SUCCESS) {
|
||||
ctx.player().swingArm(hand);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user