Package com.hypixel.hytale.protocol
Class CachedPacket<T extends Packet>
java.lang.Object
com.hypixel.hytale.protocol.CachedPacket<T>
- All Implemented Interfaces:
Packet,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.netty.buffer.ByteBufprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCachedPacket(Class<T> packetType, int packetId, io.netty.buffer.ByteBuf cachedBytes) -
Method Summary
-
Field Details
-
packetType
-
packetId
private final int packetId -
cachedBytes
private final io.netty.buffer.ByteBuf cachedBytes
-
-
Constructor Details
-
CachedPacket
-
-
Method Details
-
cache
-
getId
public int getId() -
serialize
public void serialize(@Nonnull io.netty.buffer.ByteBuf buf) -
computeSize
public int computeSize()- Specified by:
computeSizein interfacePacket
-
getPacketType
-
getCachedSize
public int getCachedSize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-