thank u intellij very cool suggestion

This commit is contained in:
Leijurv 2019-06-05 12:08:19 -07:00
parent a1c03eb601
commit 0815e3c195
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -37,7 +37,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import java.util.Objects;
import java.util.Optional;
public class MovementPillar extends Movement {
@ -240,10 +239,7 @@ public class MovementPillar extends Movement {
Block fr = frState.getBlock();
// TODO: Evaluate usage of getMaterial().isReplaceable()
if (!(fr instanceof BlockAir || frState.getMaterial().isReplaceable())) {
Optional<Rotation> reachable = RotationUtils.reachable(ctx.player(), src, ctx.playerController().getBlockReachDistance());
if (reachable.isPresent()) {
state.setTarget(new MovementState.MovementTarget(reachable.get(), true));
}
RotationUtils.reachable(ctx.player(), src, ctx.playerController().getBlockReachDistance()).map(rot -> new MovementState.MovementTarget(rot, true)).ifPresent(state::setTarget);
state.setInput(Input.JUMP, false); // breaking is like 5x slower when you're jumping
state.setInput(Input.CLICK_LEFT, true);
blockIsThere = false;