mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 11:27:54 +01:00
fix meshemitter
This commit is contained in:
parent
aeb9781bd4
commit
008b09891a
2 changed files with 11 additions and 6 deletions
|
@ -31,7 +31,9 @@ class MeshEmitter {
|
||||||
public void end() {
|
public void end() {
|
||||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||||
emit();
|
emit();
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
resultConsumer = null;
|
resultConsumer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,10 +43,11 @@ class MeshEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepareForGeometry(boolean shade) {
|
void prepareForGeometry(boolean shade) {
|
||||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding() && shade != currentShade) {
|
} else if (shade != currentShade) {
|
||||||
emit();
|
emit();
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentShade = shade;
|
currentShade = shade;
|
||||||
|
|
|
@ -34,6 +34,7 @@ class MeshEmitter implements VertexConsumer {
|
||||||
public void end() {
|
public void end() {
|
||||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||||
emit();
|
emit();
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
}
|
}
|
||||||
resultConsumer = null;
|
resultConsumer = null;
|
||||||
}
|
}
|
||||||
|
@ -44,10 +45,11 @@ class MeshEmitter implements VertexConsumer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepareForGeometry(boolean shade) {
|
void prepareForGeometry(boolean shade) {
|
||||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding() && shade != currentShade) {
|
} else if (shade != currentShade) {
|
||||||
emit();
|
emit();
|
||||||
|
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentShade = shade;
|
currentShade = shade;
|
||||||
|
|
Loading…
Reference in a new issue