Block: rename isSameType() to hasSameTypeId()

this should remove any ambiguity about its behaviour.
This commit is contained in:
Dylan K. Taylor
2023-04-21 20:25:21 +01:00
parent 769be8e140
commit 6c0ad9589b
15 changed files with 33 additions and 33 deletions

View File

@ -79,7 +79,7 @@ class Cactus extends Transparent{
}
private function canBeSupportedBy(Block $block) : bool{
return $block->isSameType($this) || $block->hasTypeTag(BlockTypeTags::SAND);
return $block->hasSameTypeId($this) || $block->hasTypeTag(BlockTypeTags::SAND);
}
public function onNearbyBlockChange() : void{
@ -102,7 +102,7 @@ class Cactus extends Transparent{
}
public function onRandomTick() : void{
if(!$this->getSide(Facing::DOWN)->isSameType($this)){
if(!$this->getSide(Facing::DOWN)->hasSameTypeId($this)){
$world = $this->position->getWorld();
if($this->age === self::MAX_AGE){
for($y = 1; $y < 3; ++$y){