mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
TypeConverter: do not send useless meta to the client
This commit is contained in:
parent
0e4b79ea77
commit
db07976aab
@ -175,6 +175,7 @@ class TypeConverter{
|
|||||||
$nbt = new CompoundTag();
|
$nbt = new CompoundTag();
|
||||||
}
|
}
|
||||||
$nbt->setInt(self::DAMAGE_TAG, $itemStack->getDamage());
|
$nbt->setInt(self::DAMAGE_TAG, $itemStack->getDamage());
|
||||||
|
$meta = 0;
|
||||||
}elseif($isBlockItem && $itemStack->getMeta() !== 0){
|
}elseif($isBlockItem && $itemStack->getMeta() !== 0){
|
||||||
//TODO HACK: This foul-smelling code ensures that we can correctly deserialize an item when the
|
//TODO HACK: This foul-smelling code ensures that we can correctly deserialize an item when the
|
||||||
//client sends it back to us, because as of 1.16.220, blockitems quietly discard their metadata
|
//client sends it back to us, because as of 1.16.220, blockitems quietly discard their metadata
|
||||||
@ -183,6 +184,7 @@ class TypeConverter{
|
|||||||
$nbt = new CompoundTag();
|
$nbt = new CompoundTag();
|
||||||
}
|
}
|
||||||
$nbt->setInt(self::PM_META_TAG, $itemStack->getMeta());
|
$nbt->setInt(self::PM_META_TAG, $itemStack->getMeta());
|
||||||
|
$meta = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user