zombies/skeletons/creepers should not spawn in blocks if only one block is free, mob limit is changeable in server.properties, small tweaks to entity hitboxes

This commit is contained in:
GameHerobrine 2023-01-17 20:01:15 +03:00
parent 9677196135
commit c2e069ef08
5 changed files with 15 additions and 12 deletions

View file

@ -574,9 +574,9 @@ class Entity extends Position
$y1 = $y1 > 128 ? 128 : $y1;
$z1 = $z1 > 256 ? 256 : $z1;
$waterDone = false;
for($x = $x0; $x < $x1; ++$x){
for($x = $x0; $x <= $x1; ++$x){
for($y = $y0; $y < $y1; ++$y){
for($z = $z0; $z < $z1; ++$z){
for($z = $z0; $z <= $z1; ++$z){
$pos = new Vector3($x, $y, $z);
$b = $this->level->getBlock($pos);
switch($b->getID()) {
@ -1531,7 +1531,8 @@ class Entity extends Position
{
throw new Exception("Use getHeightOf or getWidthOf method instead of this.");
}
/**
*
* @deprecated Use {@link getHeight} or {@link getWidth} instead