mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 13:49:55 +00:00
remove useless type asserts on Entity->getWorld()
This commit is contained in:
parent
85f3dca11b
commit
bc60bb9462
@ -47,7 +47,6 @@ class ChorusFruit extends Food{
|
|||||||
|
|
||||||
public function onConsume(Living $consumer) : void{
|
public function onConsume(Living $consumer) : void{
|
||||||
$world = $consumer->getWorld();
|
$world = $consumer->getWorld();
|
||||||
assert($world !== null);
|
|
||||||
|
|
||||||
$origin = $consumer->getPosition();
|
$origin = $consumer->getPosition();
|
||||||
$minX = $origin->getFloorX() - 8;
|
$minX = $origin->getFloorX() - 8;
|
||||||
|
@ -36,7 +36,6 @@ class FlintSteel extends Tool{
|
|||||||
public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : ItemUseResult{
|
public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : ItemUseResult{
|
||||||
if($blockReplace->getId() === BlockLegacyIds::AIR){
|
if($blockReplace->getId() === BlockLegacyIds::AIR){
|
||||||
$world = $player->getWorld();
|
$world = $player->getWorld();
|
||||||
assert($world !== null);
|
|
||||||
$world->setBlock($blockReplace->getPos(), VanillaBlocks::FIRE());
|
$world->setBlock($blockReplace->getPos(), VanillaBlocks::FIRE());
|
||||||
$world->addSound($blockReplace->getPos()->add(0.5, 0.5, 0.5), new FlintSteelSound());
|
$world->addSound($blockReplace->getPos()->add(0.5, 0.5, 0.5), new FlintSteelSound());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user