Skip to content

Commit

Permalink
better info message when section fails to sort
Browse files Browse the repository at this point in the history
  • Loading branch information
douira committed Oct 28, 2023
1 parent 96c0b19 commit 0b8f5c1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import me.jellysquid.mods.sodium.client.util.NativeBuffer;
import net.minecraft.util.math.ChunkSectionPos;

/**
* TODO: figure out why it sometimes breaks and how to fix it (if the heuristic
* thinks there can't be a cycle, why does this not work?)
*/
public class StaticTopoAcyclicData extends MixedDirectionData {
StaticTopoAcyclicData(ChunkSectionPos sectionPos, NativeBuffer buffer, VertexRange range) {
super(sectionPos, buffer, range);
Expand All @@ -22,7 +26,7 @@ static StaticTopoAcyclicData fromMesh(BuiltSectionMeshParts translucentMesh,
var indexBuffer = buffer.getDirectBuffer().asIntBuffer();

if (!ComplexSorting.topoSortDepthFirstCyclic(indexBuffer, quads, null, null)) {
System.out.println("Failed to sort topo static because there was a cycle");
System.out.println("Failed to sort topo static because there was a cycle at " + sectionPos + "! Please report this alongside the seed and coordinates of the chunk.");
}

return new StaticTopoAcyclicData(sectionPos, buffer, range);
Expand Down

0 comments on commit 0b8f5c1

Please sign in to comment.