Cake: fixed desync on cancellation of eating

closes #3591
we don't support eating in creative right now, but the cake shouldn't appear to be eaten when it's not.
This commit is contained in:
Dylan K. Taylor 2021-10-30 21:02:24 +01:00
parent 08f3c18de9
commit 5b8ce7e3e2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -94,8 +94,7 @@ class Cake extends Transparent implements FoodSource{
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
if($player !== null){
$player->consumeObject($this);
return true;
return $player->consumeObject($this);
}
return false;