public class BlockCollision extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BoundingBox[] |
boundingBoxes |
protected double |
pushAwayTolerance
This is used to control the maximum distance a face of a bounding box can push the player away
|
protected double |
pushUpTolerance
This is used for the step up logic.
|
protected int |
x |
protected int |
y |
protected int |
z |
| Constructor and Description |
|---|
BlockCollision() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeCorrectPosition(BoundingBox playerCollision)
Overridden in classes like SnowCollision and GrassPathCollision when correction code needs to be run before the
main correction
|
boolean |
checkIntersection(BoundingBox playerCollision) |
boolean |
correctPosition(GeyserSession session,
BoundingBox playerCollision)
Returns false if the movement is invalid, and in this case it shouldn't be sent to the server and should be
cancelled
While the Java server should do this, it could result in false flags by anticheat
This functionality is currently only used in 6 or 7 layer snow
|
void |
setPosition(int x,
int y,
int z) |
protected BoundingBox[] boundingBoxes
protected int x
protected int y
protected int z
protected double pushUpTolerance
protected double pushAwayTolerance
public void setPosition(int x,
int y,
int z)
public void beforeCorrectPosition(BoundingBox playerCollision)
public boolean correctPosition(GeyserSession session, BoundingBox playerCollision)
public boolean checkIntersection(BoundingBox playerCollision)
Copyright © 2021 GeyserMC. All rights reserved.