Repository: CloudburstMC/Nukkit

Issue #231: Quick crafting throws exception
Created: 2018-05-11T20:52:35Z
Expected Behavior
Get wood, craft into planks; craft a crafting table.
Actual Behavior
Server throws alert; crafting table appears in inventory but when chosen, vanishes to be replaced with planks.
Steps to Reproduce
Create a new world + server using build 152, get logs, make into planks, craft table.
Debug information
22:49:18 [ALERT] java.lang.ArrayIndexOutOfBoundsException: 1
        at cn.nukkit.inventory.ShapedRecipe.matchInputMap(ShapedRecipe.java:227)
        at cn.nukkit.inventory.ShapedRecipe.matchItems(ShapedRecipe.java:171)
        at cn.nukkit.inventory.CraftingManager.matchRecipe(CraftingManager.java:307)
        at cn.nukkit.inventory.transaction.CraftingTransaction.canExecute(CraftingTransaction.java:141)
        at cn.nukkit.inventory.transaction.InventoryTransaction.execute(InventoryTransaction.java:275)
        at cn.nukkit.inventory.transaction.CraftingTransaction.execute(CraftingTransaction.java:175)
        at cn.nukkit.Player.handleDataPacket(Player.java:2796)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1378)
        at cn.nukkit.network.Network.processPackets(Network.java:178)
        at cn.nukkit.network.Network.processBatch(Network.java:160)
        at cn.nukkit.Player.handleDataPacket(Player.java:2022)
        at cn.nukkit.network.RakNetInterface.handleEncapsulated(RakNetInterface.java:157)
        at cn.nukkit.raknet.server.ServerHandler.handlePacket(ServerHandler.java:132)
        at cn.nukkit.network.RakNetInterface.process(RakNetInterface.java:66)
        at cn.nukkit.network.Network.processInterfaces(Network.java:76)
        at cn.nukkit.Server.tick(Server.java:1074)
        at cn.nukkit.Server.tickProcessor(Server.java:848)
        at cn.nukkit.Server.start(Server.java:825)
        at cn.nukkit.Server.<init>(Server.java:508)
        at cn.nukkit.Nukkit.main(Nukkit.java:99)

Duplicate issue #367: Crafting in Android fails when selecting created item
Created: 2018-09-01T23:25:55Z
Expected Behavior

After crafting an item such as a Crafting Table, you select the table in your inventory and be able to place it in the world.
Actual Behavior

After crating an item such as a Crafting table, you select the table in your inventory, and it disappears and gets converted back into wood planks.
Steps to Reproduce


Login to server via an Android client
Create several planks of wood
Create a Crafting Table with those planks
Place the Crafting Table in the world

The frustrating part of this is that on a brand new server, it might work. After about fifteen minutes, the behavior appears to start and becomes permanent. It doesn't need to just be a crafting table; it can be a tool, bread, or dyeing a bed a different color.
Debug information

https://hastebin.com/iqoroxokuq
https://timings.aikar.co/?id=b92ea9c7deaf41e3a08d5800e258a30d
Crashdump, Backtrace or Other Files

Checklist:


 I included a /debugpaste link
 I made sure there aren't duplicates of this report (Use Search)
 I made sure I am using an up-to-date version of Nukkit
 I Made sure the bug/error is not caused by a plugin

Closing comment (2020-01-10T11:49:08Z): Duplicate of #231