Skip to content

SpawnSpot 5.46.0 ​

final class · pocketmine\world\mobs\spawn\SpawnSpot · source

A position where the spawn algorithm found room for a mob: the block the mob's feet are in and what is around it. Built by \pocketmine\world\mobs\NaturalMobSpawner from the world, or directly by tests.

Constants ​

MEDIUM_AIR ​

php
public const MEDIUM_AIR = 0

The feet are in air (or a block without collision, like grass or a flower) above a solid top surface.

MEDIUM_LAVA ​

php
public const MEDIUM_LAVA = 2

The feet are in air above lava (striders).

MEDIUM_WATER ​

php
public const MEDIUM_WATER = 1

The feet are in water above a solid top surface.

Properties ​

$biomeId ​

php
public readonly int $biomeId

$blockAtFeet ​

php
public readonly string $blockAtFeet

$blockBelow ​

php
public readonly string $blockBelow

$blockLight ​

php
public readonly int $blockLight

$medium ​

php
public readonly int $medium

$playerDistance ​

php
public readonly float $playerDistance

$skyLight ​

php
public readonly int $skyLight

$surface ​

php
public readonly bool $surface

$x ​

php
public readonly int $x

$y ​

php
public readonly int $y

$z ​

php
public readonly int $z

Methods ​

__construct() ​

php
public function __construct(int $x, int $y, int $z, bool $surface, int $medium, string $blockBelow, string $blockAtFeet, int $blockLight, int $skyLight, int $biomeId, float $playerDistance)

getBrightness() ​

php
public function getBrightness(int $skyReduction) : int

Bedrock brightness: the highest of block light and sky light dimmed by the time of day (and the weather if $skyReduction includes it).

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.