Skip to content

JavaHashSet 5.46.0 ​

final class · pocketmine\world\generator\vanilla\feature\JavaHashSet · source

Iteration order of a java.util.HashSet<BlockPos> (default capacity and load factor), which some features iterate while consuming the random (tree decorators): buckets in index order, insertion order inside a bucket.

Methods ​

hash() ​

php
public static function hash(int $x, int $y, int $z) : int

Java's (int) (y + z * 31) * 31 + x, i.e. Vec3i.hashCode().

iterationOrder() ​

php
public static function iterationOrder(array $positions) : array

key() ​

php
public static function key(int $x, int $y, int $z) : int

Packs a position into an int key (for sets/maps of positions in the decoration region).

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