mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 03:17:53 +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() {
|
||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||
emit();
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
}
|
||||
|
||||
resultConsumer = null;
|
||||
}
|
||||
|
||||
|
@ -41,10 +43,11 @@ class MeshEmitter {
|
|||
}
|
||||
|
||||
void prepareForGeometry(boolean shade) {
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
|
||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding() && shade != currentShade) {
|
||||
if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
} else if (shade != currentShade) {
|
||||
emit();
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
}
|
||||
|
||||
currentShade = shade;
|
||||
|
|
|
@ -34,6 +34,7 @@ class MeshEmitter implements VertexConsumer {
|
|||
public void end() {
|
||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||
emit();
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
}
|
||||
resultConsumer = null;
|
||||
}
|
||||
|
@ -44,10 +45,11 @@ class MeshEmitter implements VertexConsumer {
|
|||
}
|
||||
|
||||
void prepareForGeometry(boolean shade) {
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
|
||||
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding() && shade != currentShade) {
|
||||
if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
} else if (shade != currentShade) {
|
||||
emit();
|
||||
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||
}
|
||||
|
||||
currentShade = shade;
|
||||
|
|
Loading…
Reference in a new issue