Block: Make getId(), getDamage(), setDamage() non-final

In the future, these methods will be used to derive ID/meta on the fly from properties instead of using them internally.
This commit is contained in:
Dylan K. Taylor 2018-09-12 19:40:19 +01:00
parent e0574008b4
commit 778eb5fb33

View File

@ -96,7 +96,7 @@ class Block extends Position implements BlockIds, Metadatable{
/**
* @return int
*/
final public function getId() : int{
public function getId() : int{
return $this->id;
}
@ -113,14 +113,14 @@ class Block extends Position implements BlockIds, Metadatable{
/**
* @return int
*/
final public function getDamage() : int{
public function getDamage() : int{
return $this->meta;
}
/**
* @param int $meta
*/
final public function setDamage(int $meta) : void{
public function setDamage(int $meta) : void{
if($meta < 0 or $meta > 0xf){
throw new \InvalidArgumentException("Block damage values must be 0-15, not $meta");
}