reduce boilerplate around attribute handling

This commit is contained in:
Dylan K. Taylor
2019-07-31 16:41:09 +01:00
parent dc33b9e573
commit 296061d25d
10 changed files with 43 additions and 43 deletions

View File

@@ -189,7 +189,7 @@ class AddActorPacket extends DataPacket implements ClientboundPacket{
$min = $this->getLFloat();
$current = $this->getLFloat();
$max = $this->getLFloat();
$attr = Attribute::getAttribute($id);
$attr = Attribute::get($id);
if($attr !== null){
try{

View File

@@ -299,7 +299,7 @@ class NetworkBinaryStream extends BinaryStream{
$default = $this->getLFloat();
$id = $this->getString();
$attr = Attribute::getAttribute($id);
$attr = Attribute::get($id);
if($attr !== null){
$attr->setMinValue($min);
$attr->setMaxValue($max);