@@ -202,7 +202,8 @@ public MovementState updateState(MovementState state) {
202
202
}
203
203
204
204
BlockPos playerFeet = ctx .playerFeet ();
205
- if (playerFeet .equals (dest ) && (MovementHelper .isLiquid (ctx , dest ) || ctx .player ().posY - playerFeet .getY () < 0.094 )) { // lilypads
205
+ BlockPos fakeDest = new BlockPos (dest .getX () * 2 - src .getX (), dest .getY (), dest .getZ () * 2 - src .getZ ());
206
+ if ((playerFeet .equals (dest ) || playerFeet .equals (fakeDest )) && (MovementHelper .isLiquid (ctx , dest ) || ctx .player ().posY - dest .getY () < 0.5 )) { // lilypads
206
207
// 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
207
208
return state .setStatus (MovementStatus .SUCCESS );
208
209
/* else {
@@ -228,12 +229,8 @@ public MovementState updateState(MovementState state) {
228
229
double z = ctx .player ().posZ - (src .getZ () + 0.5 );
229
230
double fromStart = Math .sqrt (x * x + z * z );
230
231
if (!playerFeet .equals (dest ) || ab > 0.25 ) {
231
- BlockPos fakeDest = new BlockPos (dest .getX () * 2 - src .getX (), dest .getY (), dest .getZ () * 2 - src .getZ ());
232
- if (numTicks ++ < 20 ) {
232
+ if (numTicks ++ < 20 && fromStart < 1.25 ) {
233
233
MovementHelper .moveTowards (ctx , state , fakeDest );
234
- if (fromStart > 1.25 ) {
235
- state .getTarget ().rotation = new Rotation (state .getTarget ().rotation .getYaw () + 180F , state .getTarget ().rotation .getPitch ());
236
- }
237
234
} else {
238
235
MovementHelper .moveTowards (ctx , state , dest );
239
236
}
0 commit comments