mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Durable: do not write Damage tag if damage is zero
fixes creative inventory getting borked to hell
This commit is contained in:
parent
45be6e19f3
commit
59c5770cf2
@ -131,6 +131,6 @@ abstract class Durable extends Item{
|
||||
protected function serializeCompoundTag(CompoundTag $tag) : void{
|
||||
parent::serializeCompoundTag($tag);
|
||||
$this->unbreakable ? $tag->setByte("Unbreakable", 1) : $tag->removeTag("Unbreakable");
|
||||
$tag->setInt("Damage", $this->damage);
|
||||
$this->damage !== 0 ? $tag->setInt("Damage", $this->damage) : $tag->removeTag("Damage");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user