mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Testing handling multiple result items for ShapedRecipes
this doesn't work yet, I wanted to see how glitchy it is with cakes. The answer is: very glitchy.
This commit is contained in:
@ -133,8 +133,11 @@ class CraftingDataPacket extends DataPacket{
|
||||
$stream->putSlot($item);
|
||||
}
|
||||
|
||||
$stream->putUnsignedVarInt(1);
|
||||
$stream->putSlot($recipe->getResult());
|
||||
$results = $recipe->getAllResults();
|
||||
$stream->putUnsignedVarInt(count($results));
|
||||
foreach($results as $item){
|
||||
$stream->putSlot($item);
|
||||
}
|
||||
|
||||
$stream->putUUID($recipe->getId());
|
||||
|
||||
@ -151,8 +154,11 @@ class CraftingDataPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
$stream->putUnsignedVarInt(1);
|
||||
$stream->putSlot($recipe->getResult());
|
||||
$results = $recipe->getAllResults();
|
||||
$stream->putUnsignedVarInt(count($results));
|
||||
foreach($results as $item){
|
||||
$stream->putSlot($item);
|
||||
}
|
||||
|
||||
$stream->putUUID($recipe->getId());
|
||||
|
||||
|
Reference in New Issue
Block a user