Use different naming for fullbright, and always reset it back after setting it.

This commit is contained in:
Sebastian Hartte
2020-08-16 14:05:10 +02:00
parent 73735c5cd5
commit ee67c5ea50
8 changed files with 45 additions and 21 deletions
@@ -52,7 +52,7 @@ public class CubeBuilder {
private boolean useStandardUV = false;
private boolean renderFullBright;
private boolean emissiveMaterial;
public CubeBuilder(List<BakedQuad> output) {
this.output = output;
@@ -379,7 +379,7 @@ public class CubeBuilder {
if (e.getIndex() == 0) {
builder.put(i, u, v);
break;
} else if (e.getIndex() == 2 && renderFullBright) {
} else if (e.getIndex() == 2 && emissiveMaterial) {
// Force Brightness to 15, this is for full bright mode
// this vertex element will only be present in that case
final float lightMapU = (float) (15 * 0x20) / 0xFFFF;
@@ -434,8 +434,8 @@ public class CubeBuilder {
this.setColorRGB((int) (r * 255) << 16 | (int) (g * 255) << 8 | (int) (b * 255));
}
public void setRenderFullBright(boolean renderFullBright) {
this.renderFullBright = renderFullBright;
public void setEmissiveMaterial(boolean renderFullBright) {
this.emissiveMaterial = renderFullBright;
}
public void setCustomUv(Direction facing, float u1, float v1, float u2, float v2) {