Skip to content

Commit

Permalink
remove unused mixed and split direction data fields
Browse files Browse the repository at this point in the history
  • Loading branch information
douira committed Dec 25, 2023
1 parent 94d83c3 commit c81f53a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,15 @@ private SortType sortTypeHeuristic() {
}

if (!this.hasUnaligned) {
boolean twoOpposingNormals = this.alignedFacingBitmap == ModelQuadFacing.OPPOSING_X
boolean opposingAlignedNormals = this.alignedFacingBitmap == ModelQuadFacing.OPPOSING_X
|| this.alignedFacingBitmap == ModelQuadFacing.OPPOSING_Y
|| this.alignedFacingBitmap == ModelQuadFacing.OPPOSING_Z;

// special case B
// if there are just two normals, they are exact opposites of eachother and they
// each only have one distance, there is no way to see through one face to the
// other.
if (planeCount == 2 && twoOpposingNormals) {
if (planeCount == 2 && opposingAlignedNormals) {
return SortType.NONE;
}

Expand Down Expand Up @@ -396,7 +396,7 @@ private SortType sortTypeHeuristic() {
// there are up to two normals that are opposing, this means no dynamic sorting
// is necessary. Without static sorting, the geometry to trigger on could be
// reduced but this isn't done here as we assume static sorting is possible.
if (twoOpposingNormals || alignedNormalCount == 1) {
if (opposingAlignedNormals || alignedNormalCount == 1) {
return SortType.STATIC_NORMAL_RELATIVE;
}
} else if (alignedNormalCount == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
import net.minecraft.util.math.ChunkSectionPos;

public abstract class MixedDirectionData extends PresentTranslucentData {
public final VertexRange range;
private final VertexRange[] ranges = new VertexRange[ModelQuadFacing.COUNT];

MixedDirectionData(ChunkSectionPos sectionPos, NativeBuffer buffer, VertexRange range) {
super(sectionPos, buffer);
this.range = range;
this.ranges[ModelQuadFacing.UNASSIGNED.ordinal()] = range;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* starting at zero for each facing.
*/
public abstract class SplitDirectionData extends PresentTranslucentData {
public final VertexRange[] ranges;
private final VertexRange[] ranges;

public SplitDirectionData(ChunkSectionPos sectionPos, NativeBuffer buffer, VertexRange[] ranges) {
super(sectionPos, buffer);
Expand Down

0 comments on commit c81f53a

Please sign in to comment.