set sitting height clamp to 0-1

This commit is contained in:
Oth3r 2024-11-15 13:35:13 -06:00
commit 8012f81e46

View file

@ -9,11 +9,11 @@ public class SittingBlock extends CustomBlock {
private Double sittingHeight = 0.5; private Double sittingHeight = 0.5;
/** /**
* gets the sitting height of a block, limiting the size from -1 - 2 * gets the sitting height of a block, limiting the size from 0 - 1
* @return the sitting height, clamped * @return the sitting height, clamped
*/ */
public Double getSittingHeight() { public Double getSittingHeight() {
return Math.max(-1.0f, Math.min(2.0f, sittingHeight)); return Math.max(0f, Math.min(1f, sittingHeight));
} }
public SittingBlock() {} public SittingBlock() {}