MinicraftPlus/minicraft-plus-revived

Game crashes when dropping an item in menu

Opened this issue · 4 comments

Describe the bug
The game crashes when dropping any item with Q or Shift-Q

Steps to reproduce the error:

  1. Grab any item
  2. Drop item with Q or Shift-Q

Log
Unhandled error: General Application Crash
java.lang.ClassCastException: minicraft.screen.Menu cannot be cast to minicraft.screen.InventoryMenu
at minicraft.screen.PlayerInvDisplay.update(PlayerInvDisplay.java:361)
at minicraft.screen.InventoryMenu.tick(InventoryMenu.java:67)
at minicraft.screen.Display.tick(Display.java:102)
at minicraft.screen.PlayerInvDisplay.tick(PlayerInvDisplay.java:88)
at minicraft.core.Updater.tick(Updater.java:192)
at minicraft.core.Initializer.run(Initializer.java:95)
at minicraft.core.Game.main(Game.java:133)

I'd like to add that the bug doesn't affect creative mode, implying that for some reason dropping items is handled differently between gamemodes.

Why was #461 mentioned?

Apologies for the 461 being mentioned, I thought it would help with the issue of the bug described with as it would be mentioned with the crash report system.

Actually that issue is a separate thing.