Skip to content

Commit

Permalink
Use getSide()
Browse files Browse the repository at this point in the history
  • Loading branch information
ipad54 committed Aug 20, 2024
1 parent d971f91 commit b16b813
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/item/EndCrystal.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<?php

/*
Expand Down Expand Up @@ -44,8 +45,8 @@ public function onInteractBlock(Player $player, Block $blockReplace, Block $bloc
->extend(Facing::UP, 1);
if(
count($world->getNearbyEntities($bb)) === 0 &&
$world->getBlock($pos->up())->getTypeId() === BlockTypeIds::AIR &&
$world->getBlock($pos->up(2))->getTypeId() === BlockTypeIds::AIR
$blockClicked->getSide(Facing::UP)->getTypeId() === BlockTypeIds::AIR &&
$blockClicked->getSide(Facing::UP, 2)->getTypeId() === BlockTypeIds::AIR
){
$crystal = new EntityEndCrystal(Location::fromObject($pos->add(0.5, 1, 0.5), $world));
$crystal->spawnToAll();
Expand Down

0 comments on commit b16b813

Please sign in to comment.