Description
Sable's LevelAccelerator.getBlockState() is called during getCollisionShape() of Twilight Forest's ForceFieldBlock. The ForceFieldBlock.getShape() method queries neighboring blocks to determine its visual shape. This query triggers Sable's physics pipeline again, which recursively calls getCollisionShape() again, creating an infinite loop.
The call chain:
- Sable handles block change event
- Sable calls
RapierVoxelColliderBakery.buildPhysicsDataForBlock()
buildPhysicsDataForBlock() calls BlockStateBase.getCollisionShape()
- Twilight Forest's
ForceFieldBlock.getShape() is executed
ForceFieldBlock calls Level.getBlockState() on neighboring positions
- Sable's mixin intercepts this and triggers the physics pipeline again
- Go back to step 2 → Recursive update
How to Reproduce
- Install Sable 1.2.2 + Twilight Forest 4.8.3345 on NeoForge 1.21.1
- Generate a world with Twilight Forest dimension
- Load a chunk containing a force field block (found in Aurora Palace structures)
- Server crashes during chunk loading
Expected Behavior
Sable should ignore or skip physics processing for Twilight Forest's force field blocks, or handle them without recursively querying block states during collision shape building.
Suggested Fix
Add Twilight Forest's force field blocks to Sable's internal block blacklist, or modify RapierVoxelColliderBakery to cache/cancel recursive calls when the same block state is being processed.
Affected block IDs:
twilightforest:force_field
twilightforest:force_field_pink
twilightforest:force_field_orange
twilightforest:force_field_green
twilightforest:force_field_blue
twilightforest:force_field_violet
twilightforest:force_field_yellow
twilightforest:force_field_red
Workaround
Temporarily remove Sable from the mods folder, or manually disable Twilight Forest force field generation (not recommended as it breaks Aurora Palace structures).
Additional Context
- Full crash report:
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.fullFaceOrSimilarForceField(ForceFieldBlock.java:69)
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.cornerConnects(ForceFieldBlock.java:64)
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.getShape(ForceFieldBlock.java:99)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.getShape(BlockBehaviour.java:650)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.getCollisionShape(BlockBehaviour.java:658)
- This may affect other mods that query block states inside
getCollisionShape() or getShape(), not just Twilight Forest.
Game Log
https://mclo.gs/LN83lGY
Description
Sable's
LevelAccelerator.getBlockState()is called duringgetCollisionShape()of Twilight Forest'sForceFieldBlock. TheForceFieldBlock.getShape()method queries neighboring blocks to determine its visual shape. This query triggers Sable's physics pipeline again, which recursively callsgetCollisionShape()again, creating an infinite loop.The call chain:
RapierVoxelColliderBakery.buildPhysicsDataForBlock()buildPhysicsDataForBlock()callsBlockStateBase.getCollisionShape()ForceFieldBlock.getShape()is executedForceFieldBlockcallsLevel.getBlockState()on neighboring positionsHow to Reproduce
Expected Behavior
Sable should ignore or skip physics processing for Twilight Forest's force field blocks, or handle them without recursively querying block states during collision shape building.
Suggested Fix
Add Twilight Forest's force field blocks to Sable's internal block blacklist, or modify
RapierVoxelColliderBakeryto cache/cancel recursive calls when the same block state is being processed.Affected block IDs:
twilightforest:force_fieldtwilightforest:force_field_pinktwilightforest:force_field_orangetwilightforest:force_field_greentwilightforest:force_field_bluetwilightforest:force_field_violettwilightforest:force_field_yellowtwilightforest:force_field_redWorkaround
Temporarily remove Sable from the mods folder, or manually disable Twilight Forest force field generation (not recommended as it breaks Aurora Palace structures).
Additional Context
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.fullFaceOrSimilarForceField(ForceFieldBlock.java:69)
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.cornerConnects(ForceFieldBlock.java:64)
at TRANSFORMER/twilightforest@4.8.3345/twilightforest.block.ForceFieldBlock.getShape(ForceFieldBlock.java:99)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.getShape(BlockBehaviour.java:650)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.getCollisionShape(BlockBehaviour.java:658)
getCollisionShape()orgetShape(), not just Twilight Forest.Game Log
https://mclo.gs/LN83lGY