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 packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
@ -17,7 +17,7 @@ class EntityMountNMSPacket extends VersionNMSPacket {
|
|||||||
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
|
||||||
|
|
||||||
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
packetByteBuffer.writeVarInt(vehicleEntityID.getNumericID());
|
||||||
packetByteBuffer.writeIntArray(passengerEntityID.getNumericID());
|
packetByteBuffer.writeVarIntArray(passengerEntityID.getNumericID());
|
||||||
|
|
||||||
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
this.rawPacket = writeData(new PacketPlayOutMount(), packetByteBuffer);
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,13 @@ class PacketByteBuffer extends PacketDataSerializer {
|
|||||||
super.d(i);
|
super.d(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeUUID(UUID uuid) {
|
void writeVarIntArray(int i1) {
|
||||||
super.a(uuid);
|
writeVarInt(1);
|
||||||
|
writeVarInt(i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeIntArray(int... array) {
|
void writeUUID(UUID uuid) {
|
||||||
super.a(array);
|
super.a(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
<T> void writeDataWatcherEntry(DataWatcherKey<T> key, T value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user