mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
set sitting height clamp to 0-1
This commit is contained in:
parent
f361a84d03
commit
8012f81e46
1 changed files with 2 additions and 2 deletions
|
@ -9,11 +9,11 @@ public class SittingBlock extends CustomBlock {
|
|||
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
|
||||
*/
|
||||
public Double getSittingHeight() {
|
||||
return Math.max(-1.0f, Math.min(2.0f, sittingHeight));
|
||||
return Math.max(0f, Math.min(1f, sittingHeight));
|
||||
}
|
||||
|
||||
public SittingBlock() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue