mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Block: added a bunch of state manipulation APIs
This commit is contained in:
@ -64,6 +64,17 @@ class Anvil extends Transparent implements Fallable{
|
||||
return 0b11;
|
||||
}
|
||||
|
||||
public function getDamage() : int{ return $this->damage; }
|
||||
|
||||
/** @return $this */
|
||||
public function setDamage(int $damage) : self{
|
||||
if($damage < 0 || $damage > 2){
|
||||
throw new \InvalidArgumentException("Damage must be in range 0-2");
|
||||
}
|
||||
$this->damage = $damage;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AxisAlignedBB[]
|
||||
*/
|
||||
|
Reference in New Issue
Block a user