Basic entity motion on water

This commit is contained in:
Shoghi Cervantes
2014-09-27 00:09:38 +02:00
parent 529bf743db
commit 48041b2f19
6 changed files with 65 additions and 7 deletions

View File

@ -50,8 +50,8 @@ class Torch extends Flowable{
];
if($this->getSide($faces[$side])->isTransparent === true and !($side === 0 and $this->getSide(0)->getID() === self::FENCE)){ //Replace with common break method
$this->getLevel()->dropItem($this, Item::get(Item::TORCH));
$this->getLevel()->setBlock($this, new Air(), true);
$this->getLevel()->dropItem($this->add(0.5, 0.5, 0.5), Item::get(Item::TORCH));
return Level::BLOCK_UPDATE_NORMAL;
}