Block: don't be stupid in getSide()

This commit is contained in:
Dylan K. Taylor 2019-07-05 14:22:20 +01:00
parent b021cc2138
commit 2bd2e1125c

View File

@ -595,7 +595,7 @@ class Block extends Position implements BlockLegacyIds{
return $this->getWorld()->getBlock(Vector3::getSide($side, $step));
}
return BlockFactory::get(BlockLegacyIds::AIR, 0, Position::fromObject(Vector3::getSide($side, $step)));
throw new \InvalidStateException("Block does not have a valid world");
}
/**