mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
made pushing disableable in config, php8.1+particial 8.2 comp(not recommended)
This commit is contained in:
parent
79831c457d
commit
cb6e649081
19 changed files with 55 additions and 40 deletions
|
|
@ -72,6 +72,8 @@ class Entity extends Position
|
|||
public $inAction = false;
|
||||
public $hasKnockback;
|
||||
public $hasJumped;
|
||||
public $invincible, $crouched, $fire, $health, $status;
|
||||
public $position;
|
||||
public $onGround, $inWater;
|
||||
public $carryoverDamage;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = array())
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
abstract class Living extends Entity implements Damageable, Pathfindable{
|
||||
|
||||
public static $despawnMobs, $despawnTimer;
|
||||
public static $despawnMobs, $despawnTimer, $entityPushing;
|
||||
|
||||
public $target, $ai;
|
||||
public $pathFinder, $path = null, $currentIndex = 0, $currentNode, $pathFollower;
|
||||
|
|
@ -65,7 +65,9 @@ abstract class Living extends Entity implements Damageable, Pathfindable{
|
|||
}
|
||||
$this->ai->mobController->rotateTick();
|
||||
$this->ai->mobController->movementTick();
|
||||
$this->collideHandler();
|
||||
if(self::$entityPushing){
|
||||
$this->collideHandler();
|
||||
}
|
||||
if($this->onGround){
|
||||
//if(!$this->hasPath() && $this->pathFinder instanceof ITileNavigator){
|
||||
// $this->path = $this->pathFinder->navigate(new PathTileXYZ($this->x, $this->y, $this->z, $this->level), new PathTileXYZ($this->x + mt_rand(-10, 10), $this->y + mt_rand(-1, 1), $this->z + mt_rand(-10, 10), $this->level), 10);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue