getLevel()->setBlock($this, $this, true, true); return $ret; } public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_NORMAL){ $down = $this->getSide(Vector3::SIDE_DOWN); if($down->getId() === self::AIR or ($down instanceof Liquid)){ $fall = Entity::createEntity("FallingSand", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), new Compound("", [ "Pos" => new Enum("Pos", [ new Double("", $this->x + 0.5), new Double("", $this->y), new Double("", $this->z + 0.5) ]), "Motion" => new Enum("Motion", [ new Double("", 0), new Double("", 0), new Double("", 0) ]), "Rotation" => new Enum("Rotation", [ new Float("", 0), new Float("", 0) ]), "TileID" => new Int("TileID", $this->getId()), "Data" => new Byte("Data", $this->getDamage()), ])); $fall->spawnToAll(); } } } }