mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-19 16:03:22 +02:00
update checkPlayerSitAbility() with the entity Y-adjustment in mind
This commit is contained in:
parent
ebe2f66ff2
commit
b7094bb437
2 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ public class Logic {
|
||||||
// get the poses to check above the block
|
// get the poses to check above the block
|
||||||
BlockPos pos1 = new BlockPos(pos).add(0,1,0), pos2 = new BlockPos(pos).add(0,2,0), posBelow = new BlockPos(pos);
|
BlockPos pos1 = new BlockPos(pos).add(0,1,0), pos2 = new BlockPos(pos).add(0,2,0), posBelow = new BlockPos(pos);
|
||||||
// doesn't check 2 blocks above if not sitting above .80 of the block
|
// doesn't check 2 blocks above if not sitting above .80 of the block
|
||||||
if (pos.getY() > entity.getY() - .80) {
|
if (pos.getY() > (entity.getY()-Utl.Entity.Y_ADJUSTMENT) - .80) {
|
||||||
pos2 = pos2.add(0,-1,0);
|
pos2 = pos2.add(0,-1,0);
|
||||||
posBelow = posBelow.add(0,-1,0);
|
posBelow = posBelow.add(0,-1,0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ public class Utl {
|
||||||
/**
|
/**
|
||||||
* the customizable y height of the entity, as some versions have different sitting heights on the entity
|
* the customizable y height of the entity, as some versions have different sitting heights on the entity
|
||||||
*/
|
*/
|
||||||
private static final double Y_ADJUSTMENT = -0.2;
|
public static final double Y_ADJUSTMENT = -0.2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks if the entity's block is still there, & is valid
|
* checks if the entity's block is still there, & is valid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue