Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c72eb3e195 | ||
|
|
a4237bf1f9 | ||
|
|
e767e34b92 |
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
group 'baritone'
|
group 'baritone'
|
||||||
version '1.2.2'
|
version '1.2.3'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -202,7 +202,8 @@ public class MovementDescend extends Movement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlockPos playerFeet = ctx.playerFeet();
|
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
|
// 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);
|
return state.setStatus(MovementStatus.SUCCESS);
|
||||||
/* else {
|
/* else {
|
||||||
@@ -228,12 +229,8 @@ public class MovementDescend extends Movement {
|
|||||||
double z = ctx.player().posZ - (src.getZ() + 0.5);
|
double z = ctx.player().posZ - (src.getZ() + 0.5);
|
||||||
double fromStart = Math.sqrt(x * x + z * z);
|
double fromStart = Math.sqrt(x * x + z * z);
|
||||||
if (!playerFeet.equals(dest) || ab > 0.25) {
|
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 && fromStart < 1.25) {
|
||||||
if (numTicks++ < 20) {
|
|
||||||
MovementHelper.moveTowards(ctx, state, fakeDest);
|
MovementHelper.moveTowards(ctx, state, fakeDest);
|
||||||
if (fromStart > 1.25) {
|
|
||||||
state.getTarget().rotation = new Rotation(state.getTarget().rotation.getYaw() + 180F, state.getTarget().rotation.getPitch());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
MovementHelper.moveTowards(ctx, state, dest);
|
MovementHelper.moveTowards(ctx, state, dest);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import baritone.Baritone;
|
|||||||
import baritone.api.utils.IPlayerContext;
|
import baritone.api.utils.IPlayerContext;
|
||||||
import net.minecraft.util.EnumActionResult;
|
import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
|
|
||||||
public class BlockPlaceHelper implements Helper {
|
public class BlockPlaceHelper implements Helper {
|
||||||
@@ -38,13 +37,12 @@ public class BlockPlaceHelper implements Helper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RayTraceResult mouseOver = ctx.objectMouseOver();
|
RayTraceResult mouseOver = ctx.objectMouseOver();
|
||||||
BlockPos pos = mouseOver.getBlockPos();
|
if (!rightClickRequested || ctx.player().isRowingBoat() || mouseOver == null || mouseOver.getBlockPos() == null || mouseOver.typeOfHit != RayTraceResult.Type.BLOCK) {
|
||||||
if (!rightClickRequested || ctx.player().isRowingBoat() || pos == null || mouseOver.typeOfHit != RayTraceResult.Type.BLOCK) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rightClickTimer = Baritone.settings().rightClickSpeed.get();
|
rightClickTimer = Baritone.settings().rightClickSpeed.get();
|
||||||
for (EnumHand hand : EnumHand.values()) {
|
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);
|
ctx.player().swingArm(hand);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user