Closed ghost closed 7 years ago
The error happen when player crafted blocks or items. however it did not happen on MinecraftPE or Minecraft Win10 in "PocketGui".
Maybe this error is happened at "Classic" only.
Craft blocks or items on MinecraftPE or Minecraft Win10 in "Classic".
ErrorException: "Undefined offset: 0" (EXCEPTION) in "/src/pocketmine/Player" at line 3020
Code: src/pocketmine/Player [3016] if($recipe instanceof ShapedRecipe){ [3017] for($x = 0; $x < 3 and $canCraft; ++$x){ [3018] for($y = 0; $y < 3; ++$y){ [3019] /* @var Item $item / [3020] $item = $packet->input[$y * 3 + $x]; [3021] $ingredient = $recipe->getIngredient($x, $y); [3022] if($item->getCount() > 0){ [3023] if($ingredient === null or !$ingredient->equals($item, !$ingredient->hasAnyDamageValue(), $ingredient->hasCompoundTag())){ [3024] $canCraft = false; [3025] break; [3026] } [3027] } [3028] } [3029] } [3030] }elseif($recipe instanceof ShapelessRecipe){
https://github.com/pmmp/PocketMine-MP/issues/45
Sorry, overlook that... Thank you for answering!
Issue description
The error happen when player crafted blocks or items. however it did not happen on MinecraftPE or Minecraft Win10 in "PocketGui".
Maybe this error is happened at "Classic" only.
Steps to reproduce the issue
Craft blocks or items on MinecraftPE or Minecraft Win10 in "Classic".
OS and versions
Crashdump, backtrace or other files
ErrorException: "Undefined offset: 0" (EXCEPTION) in "/src/pocketmine/Player" at line 3020
Code: src/pocketmine/Player [3016] if($recipe instanceof ShapedRecipe){ [3017] for($x = 0; $x < 3 and $canCraft; ++$x){ [3018] for($y = 0; $y < 3; ++$y){ [3019] /* @var Item $item / [3020] $item = $packet->input[$y * 3 + $x]; [3021] $ingredient = $recipe->getIngredient($x, $y); [3022] if($item->getCount() > 0){ [3023] if($ingredient === null or !$ingredient->equals($item, !$ingredient->hasAnyDamageValue(), $ingredient->hasCompoundTag())){ [3024] $canCraft = false; [3025] break; [3026] } [3027] } [3028] } [3029] } [3030] }elseif($recipe instanceof ShapelessRecipe){