Block: Rename getItem() to asItem()

this has clearer meaning and is less likely to collide with other things.
This commit is contained in:
Dylan K. Taylor
2019-02-24 10:23:40 +00:00
parent ff35736bf9
commit 0bd1c1529e
7 changed files with 10 additions and 10 deletions

View File

@ -110,7 +110,7 @@ class FallingBlock extends Entity{
$block = $this->level->getBlock($pos);
if($block->getId() > 0 and $block->isTransparent() and !$block->canBeReplaced()){
//FIXME: anvils are supposed to destroy torches
$this->getLevel()->dropItem($this, $this->block->getItem());
$this->getLevel()->dropItem($this, $this->block->asItem());
}else{
$ev = new EntityBlockChangeEvent($this, $block, $blockTarget ?? $this->block);
$ev->call();