mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
CraftingDataPacket: fix variable name collision
This commit is contained in:
parent
a3edbc31ae
commit
093a7c239e
@ -81,8 +81,8 @@ class CraftingDataPacket extends DataPacket implements ClientboundPacket{
|
|||||||
/** @var Item */
|
/** @var Item */
|
||||||
$entry["input"] = [];
|
$entry["input"] = [];
|
||||||
for($j = 0; $j < $ingredientCount; ++$j){
|
for($j = 0; $j < $ingredientCount; ++$j){
|
||||||
$entry["input"][] = $in = $in->getRecipeIngredient();
|
$entry["input"][] = $input = $in->getRecipeIngredient();
|
||||||
$in->setCount(1); //TODO HACK: they send a useless count field which breaks the PM crafting system because it isn't always 1
|
$input->setCount(1); //TODO HACK: they send a useless count field which breaks the PM crafting system because it isn't always 1
|
||||||
}
|
}
|
||||||
$resultCount = $in->getUnsignedVarInt();
|
$resultCount = $in->getUnsignedVarInt();
|
||||||
$entry["output"] = [];
|
$entry["output"] = [];
|
||||||
@ -102,8 +102,8 @@ class CraftingDataPacket extends DataPacket implements ClientboundPacket{
|
|||||||
$count = $entry["width"] * $entry["height"];
|
$count = $entry["width"] * $entry["height"];
|
||||||
$entry["input"] = [];
|
$entry["input"] = [];
|
||||||
for($j = 0; $j < $count; ++$j){
|
for($j = 0; $j < $count; ++$j){
|
||||||
$entry["input"][] = $in = $in->getRecipeIngredient();
|
$entry["input"][] = $input = $in->getRecipeIngredient();
|
||||||
$in->setCount(1); //TODO HACK: they send a useless count field which breaks the PM crafting system
|
$input->setCount(1); //TODO HACK: they send a useless count field which breaks the PM crafting system
|
||||||
}
|
}
|
||||||
$resultCount = $in->getUnsignedVarInt();
|
$resultCount = $in->getUnsignedVarInt();
|
||||||
$entry["output"] = [];
|
$entry["output"] = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user