Skip to content

Anvil ​

class · pocketmine\block\Anvil · source

Extends Transparent
Implements Fallable, HorizontalFacing

Constants ​

SLIGHTLY_DAMAGED ​

php
public const SLIGHTLY_DAMAGED = 1

UNDAMAGED ​

php
public const UNDAMAGED = 0

VERY_DAMAGED ​

php
public const VERY_DAMAGED = 2

Methods ​

describeBlockItemState() ​

php
public function describeBlockItemState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

describeBlockOnlyState() protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getDamage() ​

php
public function getDamage() : int

getFallDamagePerBlock() ​

php
public function getFallDamagePerBlock() : float

getLandSound() ​

php
public function getLandSound() : ?\pocketmine\world\sound\Sound

getMaxFallDamage() ​

php
public function getMaxFallDamage() : float

getSupportType() ​

php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportType

onHitGround() ​

php
public function onHitGround(\pocketmine\entity\object\FallingBlock $blockEntity) : bool

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

place() ​

php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : bool

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

setDamage() ​

php
public function setDamage(int $damage) : self

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