Skip to content

NullPointerException in ContraptionColliderMixin with Create contraptions #1378

Description

@0Mayans0

Context

Description

Sable 2.0.3 crashes the server when a Create contraption (e.g. crane, aeronautics vehicle) moves and collides with entities. The crash is a NullPointerException in ContinuousOBBCollider.collideMany caused by the ContraptionColliderMixin.

Crash Log:

java.lang.NullPointerException: Cannot read field "x" because "mf.axis" is null at TRANSFORMER/create@6.0.10/com.simibubi.create.foundation.collision.ContinuousOBBCollider.collideMany(ContinuousOBBCollider.java:153) at TRANSFORMER/create@6.0.10/com.simibubi.create.content.contraptions.ContraptionCollider.collideEntities(ContraptionCollider.java:166) at TRANSFORMER/create@6.0.10/com.simibubi.create.content.contraptions.ContraptionHandler.tick(ContraptionHandler.java:54)

Steps to Reproduce

  1. Have a moving Create contraption (crane) in the world
  2. Have entities near or on the contraption
  3. Server crashes on tick

Environment

  • Minecraft: 1.21.1
  • NeoForge: 21.1.234
  • Sable: 2.0.3
  • Create: 6.0.10
  • Create Aeronautics: 1.3.0

Workaround

Disabling compatibility.create.contraptions.ContraptionColliderMixin prevents the crash. Contraptions still work correctly without it.

Additional Context

This is the latest version of Sable (2.0.3). The mixin seems to not handle cases where mf.axis can be null during continuous OBB collision calculations.

Crash Report

https://mclo.gs/DE1pLzH

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: crashSomething crashes my game

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions