Skip to content

Processors 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\processor\Processors · source

The structure processors (vanilla's StructureProcessorType): the data-driven ones of processor lists (block_rot, rule, protected_blocks, capped, block_ignore, gravity, nop) and the ones vanilla adds in code (jigsaw replacement, lava submerged blocks).

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, ?\Closure $warn = null)

archaeology() ​

php
public static function archaeology(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, string $input, string $output, string $lootTable) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

A rule processor turning one block into another with a loot table (OceanRuinPieces.archyRuleProcessor()).

blackstoneReplace() ​

php
public static function blackstoneReplace(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlackstoneReplaceProcessor (Nether ruined portals): stone blocks become their blackstone variants.

blockAge() ​

php
public static function blockAge(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, float $mossiness) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockAgeProcessor (ruined portals), simplified: stone bricks crack or get mossy, stairs / slabs / walls get mossy, obsidian sometimes becomes crying obsidian.

blockRot() ​

php
public static function blockRot(float $integrity, ?array $rottable, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockRotProcessor

capped() ​

php
public static function capped(\pocketmine\world\generator\vanilla\structure\processor\StructureProcessor $delegate, int $min, int $max) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

CappedProcessor: applies the delegate to at most a few random blocks of the template.

gravity() ​

php
public static function gravity(int $heightmap, int $offset) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

GravityProcessor: the block goes to the heightmap of its column plus its height in the template.

ignore() ​

php
public static function ignore(array $blockSet, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockIgnoreProcessor

ignoreAir() ​

php
public static function ignoreAir(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockIgnoreProcessor.AIR

ignoreStructureBlocks() ​

php
public static function ignoreStructureBlocks(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockIgnoreProcessor.STRUCTURE_BLOCK

ignoreStructureBlocksAndAir() ​

php
public static function ignoreStructureBlocksAndAir(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

BlockIgnoreProcessor.STRUCTURE_AND_AIR

jigsawReplacement() ​

php
public static function jigsawReplacement(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

JigsawReplacementProcessor: jigsaw blocks become their final state (structure voids are not placed).

lavaSubmerged() ​

php
public static function lavaSubmerged(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

LavaSubmergedBlockProcessor: blocks that are not full cubes placed in lava become lava.

parse() ​

php
public function parse(array $json) : ?\pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

parseList() ​

php
public function parseList(mixed $json) : array

A processor list: an id of worldgen/processor_list, {"processors": [...]} or a plain list.

protectedBlocks() ​

php
public static function protectedBlocks(array $protected, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

ProtectedBlockProcessor: does not replace the blocks of the set.

simpleRules() ​

php
public static function simpleRules(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, array $rules) : \pocketmine\world\generator\vanilla\structure\processor\StructureProcessor

A rule processor of simple rules: [input block, probability (1: block match), output state] (the rules RuinedPortalPiece builds in code).

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