CopperTrait
Methods
describeBlockItemState()
php
public function describeBlockItemState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetOxidation()
php
public function getOxidation() : \pocketmine\block\utils\CopperOxidationgetWeatheringResult() 5.46.0 protected
php
protected function getWeatheringResult() : ?\pocketmine\block\utils\CopperOxidationVanilla weathering, for copper blocks that oxidize over time (call it from onRandomTick()). Returns the next oxidation stage if the block should oxidize on this random tick, null otherwise.
Like vanilla, there is a 1 in ~17.6 chance to try; the attempt fails if an unwaxed copper block within 4 blocks (Manhattan distance) is less oxidized, and otherwise succeeds with a chance of ((more oxidized + 1) / (same or more oxidized + 1))², times 0.75 for unoxidized copper.
isWaxed()
php
public function isWaxed() : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolsetOxidation()
php
public function setOxidation(\pocketmine\block\utils\CopperOxidation $oxidation) : selfsetWaxed()
php
public function setWaxed(bool $waxed) : self