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:
Dylan K. Taylor
2018-03-28 20:03:04 +01:00
parent a1090623a2
commit ec332e3e60
5 changed files with 9 additions and 86 deletions

View File

@ -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;
}