update checkPlayerSitAbility() with the entity Y-adjustment in mind

This commit is contained in:
Oth3r 2025-03-14 14:22:28 -05:00
commit b7094bb437
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ public class Logic {
// 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);
// 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);
posBelow = posBelow.add(0,-1,0);
}

View file

@ -207,7 +207,7 @@ public class Utl {
/**
* 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