Skip to content

SculkSpreader 5.46.0 ​

final class · pocketmine\block\utils\SculkSpreader · source

Spreads sculk from a sculk catalyst with the experience of the mobs dying near it: port of Java's SculkSpreader (level spreader), its charge cursors and the sculk behaviours of sculk, sculk veins and other blocks (SculkBlock, SculkVeinBlock, SculkBehaviour.DEFAULT), including the sculk vein MultifaceSpreader.

Differences: sculk veins are not waterlogged on the server, so the spread skips water; random numbers come from mt_rand() instead of the level's random source.

Constants ​

ADDITIONAL_DECAY_RATE ​

php
public const ADDITIONAL_DECAY_RATE = 5

CHARGE_DECAY_RATE ​

php
public const CHARGE_DECAY_RATE = 10

GROWTH_SPAWN_COST ​

php
public const GROWTH_SPAWN_COST = 10

MAX_CHARGE ​

php
public const MAX_CHARGE = 1000

MAX_CURSORS ​

php
public const MAX_CURSORS = 32

MAX_CURSOR_DISTANCE ​

php
public const MAX_CURSOR_DISTANCE = 1024

MAX_GROWTH_RATE_RADIUS ​

php
public const MAX_GROWTH_RATE_RADIUS = 24

NO_GROWTH_RADIUS ​

php
public const NO_GROWTH_RADIUS = 4

SHRIEKER_PLACEMENT_RATE ​

php
public const SHRIEKER_PLACEMENT_RATE = 11

Methods ​

addCursors() ​

php
public function addCursors(int $x, int $y, int $z, int $charge) : void

Adds charge cursors at the given position: one per 1000 charge, at most 32 cursors in total.

clear() ​

php
public function clear() : void

getCursors() ​

php
public function getCursors() : array

hasCursors() ​

php
public function hasCursors() : bool

isSculkReplaceable() ​

php
public static function isSculkReplaceable(\pocketmine\block\Block $block) : bool

Blocks that sculk veins turn into sculk (Java tag sculk_replaceable).

updateCursors() ​

php
public function updateCursors(\pocketmine\world\World $world, int $ox, int $oy, int $oz) : void

Moves every cursor one step (Java SculkSpreader.updateCursors() with spreadVeins = true); called every tick by the catalyst at the given origin. Cursors on the same block are merged.

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