fix a rare crash when the view is occluded by falling sand, fixes #443
This commit is contained in:
parent
a6ea9ed3a6
commit
aef84eceb8
@ -169,6 +169,10 @@ public class MovementTraverse extends Movement {
|
|||||||
if (dist < 0.83) {
|
if (dist < 0.83) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
if (!state.getTarget().getRotation().isPresent()) {
|
||||||
|
// this can happen rarely when the server lags and doesn't send the falling sand entity until you've already walked through the block and are now mining the next one
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
// combine the yaw to the center of the destination, and the pitch to the specific block we're trying to break
|
// combine the yaw to the center of the destination, and the pitch to the specific block we're trying to break
|
||||||
// it's safe to do this since the two blocks we break (in a traverse) are right on top of each other and so will have the same yaw
|
// it's safe to do this since the two blocks we break (in a traverse) are right on top of each other and so will have the same yaw
|
||||||
|
Loading…
Reference in New Issue
Block a user