diff --git a/lib/GMLIB_API-JS.js b/lib/GMLIB_API-JS.js index e3cce3d..cd48ed4 100644 --- a/lib/GMLIB_API-JS.js +++ b/lib/GMLIB_API-JS.js @@ -2291,14 +2291,14 @@ class GMLIB_BinaryStream { this.writeUnsignedVarInt(data.id); this.writeUnsignedVarInt(data.type); switch (data.type) { - case 0: this.writeByte(data.value); break; - case 1: this.writeSignedShort(data.value); break; - case 2: this.writeSignedInt(data.value); break; + case 0: this.writeUnsignedChar(data.value); break; + case 1: this.writeUnsignedShort(data.value); break; + case 2: this.writeVarInt(data.value); break; case 3: this.writeFloat(data.value); break; case 4: this.writeString(data.value); break; case 5: this.writeCompoundTag(data.value); break; case 6: this.writeBlockPos(data.value); break; - case 7: this.writeSignedInt64(data.value); break; + case 7: this.writeVarInt64(data.value); break; case 8: this.writeVec3(data.value); break; default: throw new Error("Unknown data type"); }