48 $world = $consumer->getWorld();
50 $origin = $consumer->getPosition();
51 $minX = $origin->getFloorX() - 8;
52 $minY = min($origin->getFloorY(), $consumer->getWorld()->getMaxY()) - 8;
53 $minZ = $origin->getFloorZ() - 8;
59 $worldMinY = $world->getMinY();
61 for($attempts = 0; $attempts < 16; ++$attempts){
62 $x = mt_rand($minX, $maxX);
63 $y = mt_rand($minY, $maxY);
64 $z = mt_rand($minZ, $maxZ);
66 while($y >= $worldMinY && !$world->getBlockAt($x, $y, $z)->isSolid()){
73 $blockUp = $world->getBlockAt($x, $y + 1, $z);
74 $blockUp2 = $world->getBlockAt($x, $y + 2, $z);
75 if($blockUp->isSolid() || $blockUp instanceof
Liquid || $blockUp2->
isSolid() || $blockUp2 instanceof
Liquid){