mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fill null UUIDs in CraftingDataPacket, remove all UUID things from CraftingRecipe
This allows deleting lots of code, and additionally provides a huge reduction in the compressed size of CraftingDataPacket. Since we don't care about these UUIDs (they are only used in CraftingEventPacket, which is broken and unused in PM) we fill them with zeros instead.
This commit is contained in:
@ -139,7 +139,7 @@ class CraftingDataPacket extends DataPacket{
|
||||
$stream->putSlot($item);
|
||||
}
|
||||
|
||||
$stream->putUUID($recipe->getId());
|
||||
$stream->put(str_repeat("\x00", 16)); //Null UUID
|
||||
|
||||
return CraftingDataPacket::ENTRY_SHAPELESS;
|
||||
}
|
||||
@ -160,7 +160,7 @@ class CraftingDataPacket extends DataPacket{
|
||||
$stream->putSlot($item);
|
||||
}
|
||||
|
||||
$stream->putUUID($recipe->getId());
|
||||
$stream->put(str_repeat("\x00", 16)); //Null UUID
|
||||
|
||||
return CraftingDataPacket::ENTRY_SHAPED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user