Skip to content

Commit 1e661ed

Browse files
Fix #499
1 parent c3ce5bd commit 1e661ed

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@
2020
this.rawIntBuffer.put(vertexData);
2121
this.vertexCount = this.vertexCount + vertexData.length / this.vertexFormat.getIntegerSize();
2222
}
23+
@@ -515,15 +517,15 @@
24+
break;
25+
case USHORT:
26+
case SHORT:
27+
- this.byteBuffer.putShort(i, (short)((int)x * 32767 & 65535));
28+
- this.byteBuffer.putShort(i + 2, (short)((int)y * 32767 & 65535));
29+
- this.byteBuffer.putShort(i + 4, (short)((int)z * 32767 & 65535));
30+
+ this.byteBuffer.putShort(i, (short)((int)(x * 32767) & 65535));
31+
+ this.byteBuffer.putShort(i + 2, (short)((int)(y * 32767) & 65535));
32+
+ this.byteBuffer.putShort(i + 4, (short)((int)(z * 32767) & 65535));
33+
break;
34+
case UBYTE:
35+
case BYTE:
36+
- this.byteBuffer.put(i, (byte)((int)x * 127 & 0xFF));
37+
- this.byteBuffer.put(i + 1, (byte)((int)y * 127 & 0xFF));
38+
- this.byteBuffer.put(i + 2, (byte)((int)z * 127 & 0xFF));
39+
+ this.byteBuffer.put(i, (byte)((int)(x * 127) & 0xFF));
40+
+ this.byteBuffer.put(i + 1, (byte)((int)(y * 127) & 0xFF));
41+
+ this.byteBuffer.put(i + 2, (byte)((int)(z * 127) & 0xFF));
42+
}
43+
44+
this.nextVertexFormatIndex();
2345
@@ -613,5 +615,28 @@
2446
{
2547
return this.stateVertexFormat;

0 commit comments

Comments
 (0)