mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 06:09:57 +00:00
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:
parent
e0574008b4
commit
778eb5fb33
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user