-
Notifications
You must be signed in to change notification settings - Fork 78
Description
I am not using performance mods.
- Confirm
Description
When entering a Compact Machines room, the game crashes with a ClassCastException. The issue occurs when Gander Rendering (bundled with Compact Machines 7.0.78) attempts to cast a RenderConfiguration object from supermartijn642-corelib to GanderCompositeRenderType during block entity rendering.
Mod Version
7.0.78
Forge Version
NeoForge 21.1.216
Link to Crash Log
No response
Screenshot (if available)
Environment
- Minecraft Version: 1.21.1
- Mod Loader: NeoForge 21.1.216
- Compact Machines Version: 7.0.78
- supermartijn642-corelib Version: 1.1.18b
- GeckoLib Version: 4.8.3
- OS: Windows 11
- GPU: NVIDIA GeForce RTX 2060 SUPER
- Java: 21.0.9-LTS
Expected Behavior
The Compact Machines room should open and render all block entities without crashing.
Actual Behavior
The game crashes immediately when the room attempts to render, with the following error:
java.lang.ClassCastException:
class com.supermartijn642.core.render.RenderConfiguration
cannot be cast to
class dev.compactmods.gander.render.rendertypes.GanderCompositeRenderType
Error Location
The crash occurs in:
dev.compactmods.gander.render.rendertypes.GanderCompositeRenderType.of()(rendering-0.2.31.jar:12)dev.compactmods.gander.render.rendertypes.RenderTypeStore.redirectedBlockRenderType()(rendering-0.2.31.jar:44)dev.compactmods.gander.render.toolkit.RedirectingBufferSource.endBatch()(rendering-0.2.31.jar:40)
Call Stack
at dev.compactmods.gander.render.rendertypes.GanderCompositeRenderType.of()
at dev.compactmods.gander.render.rendertypes.RenderTypeStore.redirectedBlockRenderType()
at dev.compactmods.gander.render.toolkit.RedirectingBufferSource.endBatch()
at dev.compactmods.machines.client.room.MachineRoomScreen.render()
Root Cause Analysis
The GanderCompositeRenderType.of() method expects to receive a GanderCompositeRenderType object for rendering block entities. However, when supermartijn642-corelib is present, the type cast receives a RenderConfiguration object instead, which is incompatible with the expected type.
This happens during the rendering pipeline when:
- GeckoLib (4.8.3) initiates entity animations
- Gander's
RedirectingBufferSourceintercepts the render buffer GanderCompositeRenderType.of()attempts to cast the buffer configuration- Type mismatch causes immediate ClassCastException
Affected Scenarios
- Opening any Compact Machines room
- Rendering animated block entities inside rooms (e.g., OritechFuelGenerator)
- The crash occurs consistently on every room entry attempt
Related Mods
- Compact Machines: 7.0.78
- Gander Rendering (embedded): 0.2.31
- Gander UI (embedded): 0.2.31
- supermartijn642-corelib: 1.1.18b
- GeckoLib 4: 4.8.3
Possible Solutions
- Update Gander Rendering (0.2.31) to be compatible with supermartijn642-corelib 1.1.18b type interfaces
- Add defensive type checking in
GanderCompositeRenderType.of()to handleRenderConfigurationgracefully - Implement type casting safety with fallback rendering methods
- Update supermartijn642-corelib to align with Gander's rendering interface
Additional Context
- The crash only occurs when entering Compact Machines rooms
- It does not affect other rendering in the game
- The crash is reproducible 100% of the time
- No error workaround currently available
- Affected modpack: StoneBlock 4 with 389 mods
Files for Review
See attached crash logs:
- crash_assistant_app.log - Full diagnostic report
- latest.log - Complete game log with stack trace
- modlist.txt - All 389 installed mods
How to reproduce
- Create or load a Compact Machines room
- Attempt to enter the room interface by clicking on the machine room screen
- Game crashes during initial block entity rendering phase