ShulkerBox: Allow opening unless the lid is obstructed by a solid block (#4885)

fixes #4884
This commit is contained in:
IvanCraft623 2022-03-09 11:37:23 -05:00 committed by GitHub
parent 9a6ec14cbf
commit 10c0d83fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ class ShulkerBox extends Opaque{
$shulker = $this->position->getWorld()->getTile($this->position); $shulker = $this->position->getWorld()->getTile($this->position);
if($shulker instanceof TileShulkerBox){ if($shulker instanceof TileShulkerBox){
if( if(
$this->getSide($this->facing)->getId() !== BlockLegacyIds::AIR || $this->getSide($this->facing)->isSolid() ||
!$shulker->canOpenWith($item->getCustomName()) !$shulker->canOpenWith($item->getCustomName())
){ ){
return true; return true;