Fixed some usages of Item constants for Blocks

only cosmetic change
This commit is contained in:
Dylan K. Taylor 2017-10-09 10:37:19 +01:00
parent 66a3354b31
commit 7267f1a520
2 changed files with 4 additions and 4 deletions

View File

@ -1665,7 +1665,7 @@ class Level implements ChunkManager, Metadatable{
}
$above = $this->getBlock(new Vector3($target->x, $target->y + 1, $target->z));
if($above->getId() === Item::FIRE){
if($above->getId() === Block::FIRE){ //TODO: this should be done in Fire's onUpdate(), not with this hack
$this->setBlock($above, BlockFactory::get(Block::AIR), true);
}
@ -1730,7 +1730,7 @@ class Level implements ChunkManager, Metadatable{
return false;
}
if($blockClicked->getId() === Item::AIR){
if($blockClicked->getId() === Block::AIR){
return false;
}

View File

@ -196,7 +196,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
$this->namedtag->MaxTime->setValue($ev->getBurnTime());
$this->namedtag->BurnTime->setValue($ev->getBurnTime());
$this->namedtag->BurnTicks->setValue(0);
if($this->getBlock()->getId() === Item::FURNACE){
if($this->getBlock()->getId() === Block::FURNACE){
$this->getLevel()->setBlock($this, BlockFactory::get(Block::BURNING_FURNACE, $this->getBlock()->getDamage()), true);
}
@ -253,7 +253,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
}
$ret = true;
}else{
if($this->getBlock()->getId() === Item::BURNING_FURNACE){
if($this->getBlock()->getId() === Block::BURNING_FURNACE){
$this->getLevel()->setBlock($this, BlockFactory::get(Block::FURNACE, $this->getBlock()->getDamage()), true);
}
$this->namedtag->BurnTime->setValue(0);