Fix crash if transparency is disabled

This commit is contained in:
James Seibel
2023-05-22 07:18:08 -05:00
parent c539a3f3be
commit 42fc173ae2
@@ -123,10 +123,7 @@ public class LodQuadBuilder
for (int i = 0; i < 6; i++)
{
this.opaqueQuads[i] = new ArrayList<>();
if (doTransparency)
{
this.transparentQuads[i] = new ArrayList<>();
}
this.transparentQuads[i] = new ArrayList<>();
}
this.skipQuadsWithZeroSkylight = enableSkylightCulling;
@@ -327,7 +324,10 @@ public class LodQuadBuilder
public void finalizeData()
{
this.mergeQuads();
this.fixTransparencyOverVoid(); // should happen after merging
if (this.doTransparency)
{
this.fixTransparencyOverVoid(); // should happen after merging
}
}
/** Uses Greedy meshing to merge this builder's Quads. */