Block: added a bunch of state manipulation APIs

This commit is contained in:
Dylan K. Taylor
2020-11-03 19:13:32 +00:00
parent 0a8dc3edd3
commit 32929925aa
30 changed files with 374 additions and 0 deletions

View File

@ -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[]
*/