mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Fixed #2189
This commit is contained in:
parent
8080643cc9
commit
0fce83c671
@ -73,6 +73,7 @@ use pocketmine\level\format\LevelProvider;
|
|||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
use pocketmine\level\Location;
|
use pocketmine\level\Location;
|
||||||
use pocketmine\level\Position;
|
use pocketmine\level\Position;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\metadata\MetadataValue;
|
use pocketmine\metadata\MetadataValue;
|
||||||
use pocketmine\nbt\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
|
@ -63,7 +63,7 @@ abstract class Fallable extends Solid{
|
|||||||
new Float("", 0)
|
new Float("", 0)
|
||||||
]),
|
]),
|
||||||
"TileID" => new Int("TileID", $this->getID()),
|
"TileID" => new Int("TileID", $this->getID()),
|
||||||
"Data" => new Byte("Data", $this->getDamage()),
|
"TileData" => new Byte("TileData", $this->getDamage()),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$fall->spawnToAll();
|
$fall->spawnToAll();
|
||||||
|
@ -58,6 +58,10 @@ class FallingSand extends Entity{
|
|||||||
$this->namedtag["TileID"] = new Int("TileID", $this->blockId);
|
$this->namedtag["TileID"] = new Int("TileID", $this->blockId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($this->namedtag->TileData)){
|
||||||
|
$this->damage = $this->namedtag["TileData"];
|
||||||
|
}
|
||||||
|
|
||||||
if($this->blockId === 0){
|
if($this->blockId === 0){
|
||||||
$this->close();
|
$this->close();
|
||||||
}
|
}
|
||||||
@ -154,7 +158,7 @@ class FallingSand extends Entity{
|
|||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y;
|
$pk->y = $this->y;
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
$pk->did = -$this->getBlock();
|
$pk->did = -($this->getBlock() | $this->getDamage() << 0x10);
|
||||||
$player->dataPacket($pk);
|
$player->dataPacket($pk);
|
||||||
|
|
||||||
$pk = SetEntityMotionPacket::getFromPool();
|
$pk = SetEntityMotionPacket::getFromPool();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user