Reshuffle to methods
This commit is contained in:
@@ -152,9 +152,6 @@ public class RenderDataFactory45 {
|
||||
RenderDataFactory45.this.minZ = Math.min(RenderDataFactory45.this.minZ, z);
|
||||
RenderDataFactory45.this.maxZ = Math.max(RenderDataFactory45.this.maxZ, z + width);
|
||||
}
|
||||
if (auxPos > 32 || x+length>32 || z+width>32) {
|
||||
int aa = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,10 +274,7 @@ public class RenderDataFactory45 {
|
||||
}
|
||||
}
|
||||
|
||||
private void generateYZFaces() {
|
||||
for (int axis = 0; axis < 2; axis++) {//Y then Z
|
||||
this.blockMesher.axis = axis;
|
||||
if (true) {
|
||||
private void generateYZOpaqueInnerGeometry(int axis) {
|
||||
for (int layer = 0; layer < 31; layer++) {
|
||||
this.blockMesher.auxiliaryPosition = layer;
|
||||
for (int other = 0; other < 32; other++) {//TODO: need to do the faces that border sections
|
||||
@@ -333,7 +327,7 @@ public class RenderDataFactory45 {
|
||||
}
|
||||
}
|
||||
|
||||
if (true) {
|
||||
private void generateYZOpaqueOuterGeometry(int axis) {
|
||||
this.blockMesher.doAuxiliaryFaceOffset = false;
|
||||
//Hacky generate section side faces (without check neighbor section)
|
||||
for (int side = 0; side < 2; side++) {//-, +
|
||||
@@ -390,9 +384,15 @@ public class RenderDataFactory45 {
|
||||
this.blockMesher.doAuxiliaryFaceOffset = true;
|
||||
}
|
||||
|
||||
private void generateYZFaces() {
|
||||
for (int axis = 0; axis < 2; axis++) {//Y then Z
|
||||
this.blockMesher.axis = axis;
|
||||
|
||||
this.generateYZOpaqueInnerGeometry(axis);
|
||||
this.generateYZOpaqueOuterGeometry(axis);
|
||||
|
||||
|
||||
if (false) {//Non fully opaque geometry
|
||||
this.blockMesher.doAuxiliaryFaceOffset = false;
|
||||
//Note: think is ok to just reuse.. blockMesher
|
||||
this.blockMesher.axis = axis;
|
||||
for (int layer = 0; layer < 32; layer++) {
|
||||
@@ -434,7 +434,6 @@ public class RenderDataFactory45 {
|
||||
}
|
||||
this.blockMesher.finish();
|
||||
}
|
||||
this.blockMesher.doAuxiliaryFaceOffset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -451,7 +450,8 @@ public class RenderDataFactory45 {
|
||||
}
|
||||
|
||||
private static final long X_I_MSK = 0x4210842108421L;
|
||||
private void generateXFaces() {
|
||||
|
||||
private void generateXOpaqueInnerGeometry() {
|
||||
for (int y = 0; y < 32; y++) {
|
||||
long sumA = 0;
|
||||
long sumB = 0;
|
||||
@@ -569,13 +569,11 @@ public class RenderDataFactory45 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var mesher : this.xAxisMeshers) {
|
||||
mesher.finish();
|
||||
}
|
||||
|
||||
//Generate the side faces, hackily, using 0 and 1 mesher
|
||||
if (true) {
|
||||
private void generateXOuterOpaqueGeometry() {
|
||||
//Generate the side faces, hackily, using 0 and 31 mesher
|
||||
|
||||
var ma = this.xAxisMeshers[0];
|
||||
var mb = this.xAxisMeshers[31];
|
||||
ma.finish();
|
||||
@@ -630,6 +628,14 @@ public class RenderDataFactory45 {
|
||||
ma.doAuxiliaryFaceOffset = true;
|
||||
mb.doAuxiliaryFaceOffset = true;
|
||||
}
|
||||
|
||||
private void generateXFaces() {
|
||||
this.generateXOpaqueInnerGeometry();
|
||||
this.generateXOuterOpaqueGeometry();
|
||||
|
||||
for (var mesher : this.xAxisMeshers) {
|
||||
mesher.finish();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user