mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Removed entity mask
This commit is contained in:
parent
0117e8dfae
commit
f2e2cec024
@ -196,35 +196,12 @@ 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){
|
||||
|
@ -144,7 +144,7 @@ class Squid extends WaterAnimal implements Ageable{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->type = Squid::NETWORK_ID | $this->MASK;
|
||||
$pk->type = Squid::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -54,7 +54,7 @@ class Villager extends Creature implements NPC, Ageable{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->type = Villager::NETWORK_ID | $this->MASK;
|
||||
$pk->type = Villager::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -41,7 +41,7 @@ class Zombie extends Monster{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->type = Zombie::NETWORK_ID | $this->MASK;
|
||||
$pk->type = Zombie::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
Loading…
x
Reference in New Issue
Block a user