forked from virt-mirrors/Sit
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;
|
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() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue