mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 03:02:11 +01:00
Improve isAboveLadder by using a bounding box rather.
This commit is contained in:
parent
040c32d5d0
commit
1efb62c943
@ -208,8 +208,12 @@ public class PlayerLocation {
|
||||
* @return true, if the player above on stairs
|
||||
*/
|
||||
public boolean isAboveStairs() {
|
||||
if (aboveStairs == null)
|
||||
aboveStairs = BlockProperties.isStairs(getTypeIdBelow().intValue());
|
||||
if (aboveStairs == null){
|
||||
// aboveStairs = BlockProperties.isStairs(getTypeIdBelow().intValue());
|
||||
// TODO: maybe distinguish upside down stairs and normal stairs !
|
||||
final double diff = getWidth();
|
||||
aboveStairs = BlockProperties.collides(getBlockAccess(), x - diff, y + 0.25, z - diff, x + diff, y - 1.0, z + diff, BlockProperties.F_STAIRS);
|
||||
}
|
||||
return aboveStairs;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user