Durable: use new CompoundTag API

This commit is contained in:
Dylan K. Taylor 2017-11-18 11:13:10 +00:00
parent 12bbc764ec
commit eaba105614

View File

@ -32,8 +32,7 @@ abstract class Durable extends Item{
* @return bool
*/
public function isUnbreakable() : bool{
$tag = $this->getNamedTagEntry("Unbreakable");
return $tag !== null and $tag->getValue() !== 0;
return $this->getNamedTag()->getByte("Unbreakable", 0) !== 0;
}
/**