mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-26 18:57:40 +01:00
Optimize packet write
This commit is contained in:
parent
03b6437f23
commit
05488268b0
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||
|
||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
||||
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||
|
||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||
}
|
||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
||||
super.d(i);
|
||||
}
|
||||
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
void writeVarIntArray(int i1) {
|
||||
writeVarInt(1);
|
||||
writeVarInt(i1);
|
||||
}
|
||||
|
||||
void writeIntArray(int... array) {
|
||||
super.a(array);
|
||||
void writeUUID(UUID uuid) {
|
||||
super.a(uuid);
|
||||
}
|
||||
|
||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||
|
Loading…
Reference in New Issue
Block a user