Class StructureCache

java.lang.Object
com.comphenix.protocol.injector.StructureCache

public class StructureCache extends Object
Caches structure modifiers.
Author:
Kristian
  • Constructor Details

    • StructureCache

      public StructureCache()
  • Method Details

    • newPacket

      public static Object newPacket(Class<?> clazz)
    • newPacket

      public static Object newPacket(PacketType type)
      Creates an empty Minecraft packet of the given type.
      Parameters:
      type - - packet type.
      Returns:
      Created packet.
    • getStructure

      public static StructureModifier<Object> getStructure(PacketType type)
      Retrieve a cached structure modifier for the given packet type.
      Parameters:
      type - - packet type.
      Returns:
      A structure modifier.
    • getStructure

      public static StructureModifier<Object> getStructure(Class<?> packetType)
      Retrieve a cached structure modifier given a packet type.
      Parameters:
      packetType - - packet type.
      Returns:
      A structure modifier.
    • getStructure

      public static StructureModifier<Object> getStructure(Class<?> packetType, boolean compile)
      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

      public static StructureModifier<Object> getStructure(PacketType type, boolean compile)
      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.