This commit is contained in:
Shoghi Cervantes 2014-10-28 13:27:30 +01:00
parent 8080643cc9
commit 0fce83c671
3 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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();