Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
Thiepine reduces garbage collection pauses in Minecraft by adding a fast early-exit check before VoxelShape.move() allocates objects during entity collision detection. It is a Fabric mod for Minecraft 26.2.
When an entity moves, the game needs to know which blocks it is touching. It iterates over every block position inside the entity's bounding box and retrieves the collision shape for each block. For non-full blocks like slabs, stairs, pipes, and fences, the game calls VoxelShape.move() to shift the shape from its internal coordinate system to the block's world position. This call allocates three OffsetDoubleList objects and one ArrayVoxelShape every time it runs.
In a dense build or a mob farm with many entities, these allocations happen thousands of times per tick. The objects fill up the young generation of the garbage collector quickly. When the young generation is full, Java stops everything to sweep it, causing a visible hitch. The frame time graph shows a spike, the game stutters, and then it continues.
Thiepine intercepts the move() call inside BlockCollisions.computeNext(). Before the allocation happens, it reads the original shape's axis-aligned bounding box as six double values. It adds the block position to those values using plain arithmetic. Then it checks whether the resulting box overlaps the entity's bounding box with a simple intersect test.
If the boxes do not overlap, VoxelShape.move() never runs. No OffsetDoubleList objects are created. No ArrayVoxelShape is created. The expensive Shapes.joinIsNotEmpty() call that follows is also skipped. The block position is skipped and the loop moves on.
If the boxes do overlap, the original move() call runs and the full collision test proceeds. This fallthrough handles cases where the bounding boxes touch but the actual shapes do not. The early check never produces a false negative, only false positives, and the false positives are caught by the existing code.
The check is safe because a VoxelShape bounding box always contains the entire shape. If two bounding boxes do not intersect, the shapes they contain cannot intersect either.
In a benchmark run against a mob farm with about 40 chickens in a 3x3 hole, median MSPT dropped from 1.75 to 1.46 and the 95th percentile dropped from 3.07 to 2.61. The mod itself accounts for about 0.66 percent of render thread time. The rest of the savings come from the allocations it prevents.
The mod shows the largest improvement in worlds with many non-full blocks. Modded packs with pipes, cables, connected textures, and custom block shapes see the most benefit because those blocks trigger the allocation path that Thiepine skips.


