fixed mob physics on ice

This commit is contained in:
GameHerobrine 2024-02-15 06:43:36 +03:00
parent 19a66be51a
commit 0469550ca2
4 changed files with 6 additions and 8 deletions

View file

@ -667,7 +667,6 @@ class Entity extends Position
$dz = $cz;
$this->boundingBox->setBB($aabb1);
}
}
$this->x = ($this->boundingBox->minX + $this->boundingBox->maxX) / 2;

View file

@ -225,7 +225,7 @@ abstract class Living extends Entity implements Pathfindable{
//{
// $var5 = $this->landMovementFactor;
//}
//$var5 *= $var8;
$var5 *= $var8;
}else{
$var5 = $this->jumpMovementFactor;
}
@ -255,9 +255,6 @@ abstract class Living extends Entity implements Pathfindable{
$this->ai->mobController->setJumping(true); //non vanilla
}
}
//TODO limbYaw - is it even needed?
}
public function sendMoveUpdate(){

View file

@ -171,8 +171,10 @@ class StairBlock extends TransparentBlock{
$metaNearby = $level->level->getBlockDamage($x + 1, $y, $z);
if(self::isBlocksStairsID($idNearby) && ($meta & 4) == ($metaNearby & 4)){
$minX = 0.5;
$maxX = 1.0;
$metaNearbyAnd3 = $metaNearby & 3;
if($metaNearbyAnd3 == 3 && !self::isStairsAtXYZAndAreTheirMetadataSame($level, $x, $y, $z - 1, $meta)){
$minZ = 0;
$maxZ = 0.5;

View file

@ -389,9 +389,9 @@ class Level{
for($c = 0; $c <= 20; ++$c){
$xyz = mt_rand(0, 0xffffffff) >> 2;
$x = $xyz & 0xf;
$z = ($xyz >> 8) & 0xf; //TODO might be possible to make some micro optmizations
$z = ($xyz >> 8) & 0xf;
$y = ($xyz >> 16) & 0x7f;
$id = $this->level->fastGetBlockID($cX, $y >> 4, $cZ, $x, $y & 0xf, $z, $index); //$this->level->getBlockID(($cX << 4) + $x, $y, $z + ($cZ << 4));
$id = $this->level->fastGetBlockID($cX, $y >> 4, $cZ, $x, $y & 0xf, $z, $index);
if(isset(self::$randomUpdateBlocks[$id])){
$cl = Block::$class[$id];
$cl::onRandomTick($this, ($cX << 4) + $x, $y, $z + ($cZ << 4));