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