From b7094bb437ba217f6876921bc58afe871c9e7822 Mon Sep 17 00:00:00 2001 From: Oth3r <68134921+Oth3r@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:22:28 -0500 Subject: [PATCH] update checkPlayerSitAbility() with the entity Y-adjustment in mind --- src/main/java/one/oth3r/sit/utl/Logic.java | 2 +- src/main/java/one/oth3r/sit/utl/Utl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/one/oth3r/sit/utl/Logic.java b/src/main/java/one/oth3r/sit/utl/Logic.java index 2708393..874dc38 100644 --- a/src/main/java/one/oth3r/sit/utl/Logic.java +++ b/src/main/java/one/oth3r/sit/utl/Logic.java @@ -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); } diff --git a/src/main/java/one/oth3r/sit/utl/Utl.java b/src/main/java/one/oth3r/sit/utl/Utl.java index 154a6d6..b0ca2a6 100644 --- a/src/main/java/one/oth3r/sit/utl/Utl.java +++ b/src/main/java/one/oth3r/sit/utl/Utl.java @@ -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