Skip to content

Commit

Permalink
Correct switchig formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Asek3 committed Sep 7, 2023
1 parent c9e1302 commit d6f99d4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public abstract class MixinBufferBuilder implements BufferVertexConsumer, BlockS

@Shadow
public abstract void putShort(int i, short s);

@Shadow
protected abstract void switchFormat(VertexFormat format);

@Shadow
protected abstract void ensureCapacity(int i);
Expand Down Expand Up @@ -120,10 +123,10 @@ public abstract class MixinBufferBuilder implements BufferVertexConsumer, BlockS
private void iris$afterBegin(int drawMode, VertexFormat format, CallbackInfo ci) {
if (extending) {
if (format == DefaultVertexFormat.NEW_ENTITY) {
this.format = IrisVertexFormats.ENTITY;
this.switchFormat(IrisVertexFormats.ENTITY);
this.iris$isTerrain = false;
} else {
this.format = IrisVertexFormats.TERRAIN;
this.switchFormat(IrisVertexFormats.TERRAIN);
this.iris$isTerrain = true;
}
this.currentElement = this.format.getElements().get(0);
Expand Down

0 comments on commit d6f99d4

Please sign in to comment.