Package com.comphenix.protocol.injector
Class StructureCache
java.lang.Object
com.comphenix.protocol.injector.StructureCache
Caches structure modifiers.
- Author:
- Kristian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StructureModifier<Object>getStructure(PacketType type)Retrieve a cached structure modifier for the given packet type.static StructureModifier<Object>getStructure(PacketType type, boolean compile)Retrieve a cached structure modifier for the given packet type.static StructureModifier<Object>getStructure(Class<?> packetType)Retrieve a cached structure modifier given a packet type.static StructureModifier<Object>getStructure(Class<?> packetType, boolean compile)Retrieve a cached structure modifier given a packet type.static ObjectnewPacket(PacketType type)Creates an empty Minecraft packet of the given type.static Object
-
Constructor Details
-
StructureCache
public StructureCache()
-
-
Method Details
-
newPacket
-
newPacket
Creates an empty Minecraft packet of the given type.- Parameters:
type- - packet type.- Returns:
- Created packet.
-
getStructure
Retrieve a cached structure modifier for the given packet type.- Parameters:
type- - packet type.- Returns:
- A structure modifier.
-
getStructure
Retrieve a cached structure modifier given a packet type.- Parameters:
packetType- - packet type.- Returns:
- A structure modifier.
-
getStructure
Retrieve a cached structure modifier given a packet type.- Parameters:
packetType- - packet type.compile- - whether or not to asynchronously compile the structure modifier.- Returns:
- A structure modifier.
-
getStructure
Retrieve a cached structure modifier for the given packet type.- Parameters:
type- - packet type.compile- - whether or not to asynchronously compile the structure modifier.- Returns:
- A structure modifier.
-