mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 04:00:29 +00:00
Added Squids with basic AI
This commit is contained in:
@@ -196,12 +196,35 @@ abstract class Entity extends Location implements Metadatable{
|
||||
/** @var \pocketmine\event\TimingsHandler */
|
||||
protected $timings;
|
||||
|
||||
protected $MASK = 0;
|
||||
|
||||
|
||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
||||
if($chunk === null or $chunk->getProvider() === null){
|
||||
throw new ChunkException("Invalid garbage Chunk given to Entity");
|
||||
}
|
||||
|
||||
$PF = 0x200;
|
||||
if($this instanceof Living){
|
||||
$this->MASK |= 0x100 | $PF;
|
||||
}
|
||||
if($this instanceof Ageable){
|
||||
$this->MASK |= 0x400;
|
||||
}
|
||||
if($this instanceof Monster){
|
||||
$this->MASK |= 0x800;
|
||||
}
|
||||
if($this instanceof Animal){
|
||||
$this->MASK |= 0x1000;
|
||||
}
|
||||
if($this instanceof WaterAnimal){
|
||||
$this->MASK |= 0x2000;
|
||||
}
|
||||
if($this instanceof Tameable){
|
||||
$this->MASK |= 0x4000;
|
||||
}
|
||||
//AMBIENT = 0x100 | 0x8000;
|
||||
|
||||
$this->timings = Timings::getEntityTimings($this);
|
||||
|
||||
if($this->eyeHeight === null){
|
||||
|
Reference in New Issue
Block a user