diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index dcb28590e..43ae6c753 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -176,7 +176,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ $item = $this->getInventory()->getItemInHand(); $pk->item = $item->getId(); $pk->meta = $item->getDamage(); - $pk->metadata = $this->getData(); + $pk->metadata = $this->dataProperties; $player->dataPacket($pk); $player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ); diff --git a/src/pocketmine/entity/Villager.php b/src/pocketmine/entity/Villager.php index 0ba3c4979..194d9f9b9 100644 --- a/src/pocketmine/entity/Villager.php +++ b/src/pocketmine/entity/Villager.php @@ -60,7 +60,7 @@ class Villager extends Creature implements NPC, Ageable{ $pk->z = $this->z; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; - $pk->metadata = $this->getData(); + $pk->metadata = $this->dataProperties; $player->dataPacket($pk); $player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ); @@ -80,4 +80,4 @@ class Villager extends Creature implements NPC, Ageable{ public function getProfession(){ return $this->namedtag["Profession"]; } -} \ No newline at end of file +} diff --git a/src/pocketmine/entity/Zombie.php b/src/pocketmine/entity/Zombie.php index a20670578..740f6d5c8 100644 --- a/src/pocketmine/entity/Zombie.php +++ b/src/pocketmine/entity/Zombie.php @@ -48,7 +48,7 @@ class Zombie extends Monster{ $pk->z = $this->z; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; - $pk->metadata = $this->getData(); + $pk->metadata = $this->dataProperties; $player->dataPacket($pk); $player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ); @@ -78,4 +78,4 @@ class Zombie extends Monster{ return $drops; } -} \ No newline at end of file +} diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 68fa8bab1..13e88fd99 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1342,8 +1342,6 @@ class Level implements ChunkManager, Metadatable{ $target = $this->getBlock($vector); $block = $target->getSide($face); - $this->addParticle(new \pocketmine\level\particle\FloatingTextParticle($target->add(0.5, 1.5, 0.5), "TESTTTTT\nSssass")); - if($block->y > 127 or $block->y < 0){ return false; } diff --git a/src/pocketmine/level/particle/HearthParticle.php b/src/pocketmine/level/particle/HeartParticle.php similarity index 96% rename from src/pocketmine/level/particle/HearthParticle.php rename to src/pocketmine/level/particle/HeartParticle.php index 0dc2fc234..64a24b58f 100644 --- a/src/pocketmine/level/particle/HearthParticle.php +++ b/src/pocketmine/level/particle/HeartParticle.php @@ -28,7 +28,7 @@ use pocketmine\network\protocol\AddMobPacket; use pocketmine\network\protocol\EntityEventPacket; use pocketmine\network\protocol\RemoveEntityPacket; -class HearthParticle extends Particle{ +class HeartParticle extends Particle{ //TODO: HACK! //TODO: needs more testing! @@ -42,7 +42,7 @@ class HearthParticle extends Particle{ $pk->eid = $entityId; $pk->type = Wolf::NETWORK_ID; $pk->x = $this->x; - $pk->y = $this->y; + $pk->y = $this->y - 1; $pk->z = $this->z; $pk->pitch = 0; $pk->yaw = 0; diff --git a/src/pocketmine/level/particle/WaterParticle.php b/src/pocketmine/level/particle/WaterParticle.php deleted file mode 100644 index 9d1bee9ed..000000000 --- a/src/pocketmine/level/particle/WaterParticle.php +++ /dev/null @@ -1,72 +0,0 @@ -x, $pos->y, $pos->z); - $this->angle = $angle; - } - - public function encode(){ - $entityId = bcadd("1095216660480", mt_rand(0, 0x7fffffff)); //No conflict with other things - $pk = new AddEntityPacket(); - $pk->eid = $entityId; - $pk->type = 77; - $pk->x = $this->x; - $pk->y = $this->y; - $pk->z = $this->z; - $pk->did = 0; - - $pk2 = new SetEntityDataPacket(); - $pk2->eid = $entityId; - $pk2->metadata = [ - Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE, 1 << Entity::DATA_FLAG_INVISIBLE], - Entity::DATA_AIR => [Entity::DATA_TYPE_SHORT, 300], - 2 => [Entity::DATA_TYPE_FLOAT, $this->x], - 4 => [Entity::DATA_TYPE_FLOAT, $this->z], - 8 => [Entity::DATA_TYPE_FLOAT, $this->angle] - ]; - - $pk3 = new EntityEventPacket(); - $pk3->eid = $entityId; - $pk3->event = 12; - - $pk4 = new RemoveEntityPacket(); - $pk4->eid = $entityId; - - return [$pk, $pk2, $pk3, $pk4]; - } -}