Block creating and property handling rewrite, part1

This commit is contained in:
Shoghi Cervantes
2014-12-07 01:53:27 +01:00
parent 79236c971c
commit a0d4bff385
138 changed files with 1912 additions and 835 deletions

View File

@ -34,8 +34,6 @@ use pocketmine\Player;
abstract class Fallable extends Solid{
public $hasPhysics = true;
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
$ret = $this->getLevel()->setBlock($this, $this, true, true);
@ -43,7 +41,7 @@ abstract class Fallable extends Solid{
}
public function onUpdate($type){
if($this->hasPhysics === true and $type === Level::BLOCK_UPDATE_NORMAL){
if($type === Level::BLOCK_UPDATE_NORMAL){
$down = $this->getSide(0);
if($down->getID() === self::AIR or ($down instanceof Liquid)){
$fall = Entity::createEntity("FallingSand", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), new Compound("", [