mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-02 22:07:50 +01:00
Comments.
This commit is contained in:
parent
0e041c419a
commit
c2e4549ec7
@ -28,6 +28,8 @@ public class Passable extends Check {
|
|||||||
if (!from.isPassable()){
|
if (!from.isPassable()){
|
||||||
// Only allow moving further out of the block (still allows going round in circles :p)
|
// Only allow moving further out of the block (still allows going round in circles :p)
|
||||||
final Vector blockMiddle = new Vector(0.5 + from.getBlockX(), 0.5 + from.getBlockY(), 0.5 + from.getBlockZ());
|
final Vector blockMiddle = new Vector(0.5 + from.getBlockX(), 0.5 + from.getBlockY(), 0.5 + from.getBlockZ());
|
||||||
|
// TODO: Allow moving out of one block towards non-solid blocks (closest only ?).
|
||||||
|
// TODO: Allow moving out of half steps ?
|
||||||
if (blockMiddle.distanceSquared(from.getVector()) < blockMiddle.distanceSquared(to.getVector())) {
|
if (blockMiddle.distanceSquared(from.getVector()) < blockMiddle.distanceSquared(to.getVector())) {
|
||||||
// Further check for the players location as possible set back.
|
// Further check for the players location as possible set back.
|
||||||
loc = player.getLocation();
|
loc = player.getLocation();
|
||||||
|
Loading…
Reference in New Issue
Block a user