Skip to content

ClassCastException: AirItem cannot be cast to class AbstractGadget #767

@DiegoRutolo

Description

@DiegoRutolo

Building Gadgets version

3.13.2

Minecraft Version

1.18.2

Forge Version

40.2.17

Modpack & Version

Multiblock Maddness 2 0.7.1

Do you have optifine installed?

No

Describe the issue

Game crashed randomly.

Steps to reproduce

  • Playing in a single player world.
  • Had 2 Building Gadgets inside a backpack from Sophisticated Backpacks, equiped in back slot from curios.
  • No action related to Building Gadgets.
  • Unable to reproduce at will.

Happened 2 times in a span of 3 weeks, so not very common, but it means I'm not that crazy.

Expected behaviour

Game should not crash.

Screenshots

No response

Log files

https://pastebin.com/43ZdYwzn

Additional information

Reporting just in case it's helpful. Looks like EventRenderWorldLast.RenderLevelLastEvent is triggered incorrectly.

((AbstractGadget) heldItem.getItem()).getRender().render(evt, player, heldItem);

Adding a type check before this line should prevent the crash, but real issue is probably somewhere else.

Information

  • I have provided as much information as possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions