mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
sneaking fix
This commit is contained in:
parent
d02c98b2b3
commit
64151dcad0
4 changed files with 12 additions and 6 deletions
|
|
@ -733,7 +733,7 @@ class Entity extends Position{
|
|||
|
||||
public function inBlock(Vector3 $block, $radius = 0.8){
|
||||
$me = new Vector3($this->x - 0.5, $this->y, $this->z - 0.5);
|
||||
if(($block->y == ((int) $this->y) or $block->y == (((int) $this->y) + 1)) and $block->maxPlainDistance($me) < $radius){
|
||||
if(($block->y == (ceil($this->y)) or $block->y == (ceil($this->y) + 1)) and $block->maxPlainDistance($me) < $radius){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue