Files
2023-03-11 14:12:09 +08:00

28 lines
873 B
Diff

--- a/com/mojang/blaze3d/vertex/BufferBuilder.java
+++ b/com/mojang/blaze3d/vertex/BufferBuilder.java
@@ -332,6 +_,7 @@
}
ByteBuffer bytebuffer = this.f_85648_.slice();
+ bytebuffer.order(this.f_85648_.order()); // FORGE: Fix incorrect byte order
this.f_85648_.clear();
return Pair.of(bufferbuilder$drawstate, bytebuffer);
}
@@ -444,4 +_,16 @@
this.f_166822_ = p_166829_;
}
}
+
+ // Forge start
+ public void putBulkData(ByteBuffer buffer) {
+ m_85722_(buffer.limit() + this.f_85658_.m_86020_());
+ this.f_85648_.position(this.f_85654_ * this.f_85658_.m_86020_());
+ this.f_85648_.put(buffer);
+ this.f_85654_ += buffer.limit() / this.f_85658_.m_86020_();
+ this.f_85652_ += buffer.limit();
+ }
+
+ @Override
+ public VertexFormat getVertexFormat() { return this.f_85658_; }
}