From bc60bb946237fea8d3961221ee1c403bb2241314 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 7 Feb 2020 22:08:38 +0000 Subject: [PATCH] remove useless type asserts on Entity->getWorld() --- src/item/ChorusFruit.php | 1 - src/item/FlintSteel.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/item/ChorusFruit.php b/src/item/ChorusFruit.php index 5bca292084..ac1e10188b 100644 --- a/src/item/ChorusFruit.php +++ b/src/item/ChorusFruit.php @@ -47,7 +47,6 @@ class ChorusFruit extends Food{ public function onConsume(Living $consumer) : void{ $world = $consumer->getWorld(); - assert($world !== null); $origin = $consumer->getPosition(); $minX = $origin->getFloorX() - 8; diff --git a/src/item/FlintSteel.php b/src/item/FlintSteel.php index 04c3150904..def28d56e3 100644 --- a/src/item/FlintSteel.php +++ b/src/item/FlintSteel.php @@ -36,7 +36,6 @@ class FlintSteel extends Tool{ public function onActivate(Player $player, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector) : ItemUseResult{ if($blockReplace->getId() === BlockLegacyIds::AIR){ $world = $player->getWorld(); - assert($world !== null); $world->setBlock($blockReplace->getPos(), VanillaBlocks::FIRE()); $world->addSound($blockReplace->getPos()->add(0.5, 0.5, 0.5), new FlintSteelSound());