Package com.comphenix.protocol.injector
Class StructureCache
java.lang.Object
com.comphenix.protocol.injector.StructureCache
Caches structure modifiers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanCreateInstance(Class<?> clazz) static StructureModifier<Object> getStructure(PacketType packetType) Retrieve a cached structure modifier for the given packet type.static StructureModifier<Object> getStructure(Class<?> packetType) Deprecated.static ObjectnewInstance(Class<?> clazz) static ObjectReturns a new mocked null data serializer instance, if possible.static ObjectnewPacket(PacketType type) Creates an empty Minecraft packet of the given type.static ObjectDeprecated.Renamed tonewInstance(Class).static booleanCreates a packet data serializer sub-class if needed to allow the fixed read of a NbtTagCompound because of a null check in the MapChunk packet constructor.
-
Constructor Details
-
StructureCache
public StructureCache()
-
-
Method Details
-
newPacket
Deprecated.Renamed tonewInstance(Class). -
canCreateInstance
-
newInstance
-
newPacket
Creates an empty Minecraft packet of the given type.- Parameters:
type- - packet type.- Returns:
- Created packet.
-
getStructure
Deprecated.usegetStructure(PacketType)instead.Retrieve a cached structure modifier given a packet type.- Parameters:
packetType- - packet type.- Returns:
- A structure modifier.
-
getStructure
Retrieve a cached structure modifier for the given packet type.- Parameters:
packetType- - packet type.- Returns:
- A structure modifier.
-
newNullDataSerializer
Returns a new mocked null data serializer instance, if possible.- Returns:
- a new null data serializer instance.
-
tryInitTrickDataSerializer
public static boolean tryInitTrickDataSerializer()Creates a packet data serializer sub-class if needed to allow the fixed read of a NbtTagCompound because of a null check in the MapChunk packet constructor.
-
getStructure(PacketType)instead.