mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +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\Location;
|
||||
use pocketmine\level\Position;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\metadata\MetadataValue;
|
||||
use pocketmine\nbt\NBT;
|
||||
|
@ -63,7 +63,7 @@ abstract class Fallable extends Solid{
|
||||
new Float("", 0)
|
||||
]),
|
||||
"TileID" => new Int("TileID", $this->getID()),
|
||||
"Data" => new Byte("Data", $this->getDamage()),
|
||||
"TileData" => new Byte("TileData", $this->getDamage()),
|
||||
]));
|
||||
|
||||
$fall->spawnToAll();
|
||||
|
@ -58,6 +58,10 @@ class FallingSand extends Entity{
|
||||
$this->namedtag["TileID"] = new Int("TileID", $this->blockId);
|
||||
}
|
||||
|
||||
if(isset($this->namedtag->TileData)){
|
||||
$this->damage = $this->namedtag["TileData"];
|
||||
}
|
||||
|
||||
if($this->blockId === 0){
|
||||
$this->close();
|
||||
}
|
||||
@ -154,7 +158,7 @@ class FallingSand extends Entity{
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->did = -$this->getBlock();
|
||||
$pk->did = -($this->getBlock() | $this->getDamage() << 0x10);
|
||||
$player->dataPacket($pk);
|
||||
|
||||
$pk = SetEntityMotionPacket::getFromPool();
|
||||
|
Loading…
x
Reference in New Issue
Block a user