Class AbstractStructure

java.lang.Object
com.comphenix.protocol.events.AbstractStructure
Direct Known Subclasses:
InternalStructure, PacketContainer

public abstract class AbstractStructure extends Object
  • Field Details

  • Constructor Details

    • AbstractStructure

      protected AbstractStructure()
    • AbstractStructure

      protected AbstractStructure(Object handle, StructureModifier<Object> modifier)
  • Method Details

    • getHandle

      public Object getHandle()
    • getModifier

      public StructureModifier<Object> getModifier()
    • getSpecificModifier

      public <T> StructureModifier<T> getSpecificModifier(Class<T> primitiveType)
      Retrieves a read/write structure for every field with the given type.
      Type Parameters:
      T - Type
      Parameters:
      primitiveType - - the type to find.
      Returns:
      A modifier for this specific type.
    • getBytes

      public StructureModifier<Byte> getBytes()
      Retrieves a read/write structure for every byte field.
      Returns:
      A modifier for every byte field.
    • getBooleans

      public StructureModifier<Boolean> getBooleans()
      Retrieves a read/write structure for every boolean field.
      Returns:
      A modifier for every boolean field.
    • getShorts

      public StructureModifier<Short> getShorts()
      Retrieves a read/write structure for every short field.
      Returns:
      A modifier for every short field.
    • getIntegers

      public StructureModifier<Integer> getIntegers()
      Retrieves a read/write structure for every integer field.
      Returns:
      A modifier for every integer field.
    • getLongs

      public StructureModifier<Long> getLongs()
      Retrieves a read/write structure for every long field.
      Returns:
      A modifier for every long field.
    • getFloat

      public StructureModifier<Float> getFloat()
      Retrieves a read/write structure for every float field.
      Returns:
      A modifier for every float field.
    • getDoubles

      public StructureModifier<Double> getDoubles()
      Retrieves a read/write structure for every double field.
      Returns:
      A modifier for every double field.
    • getStrings

      public StructureModifier<String> getStrings()
      Retrieves a read/write structure for every String field.
      Returns:
      A modifier for every String field.
    • getUUIDs

      public StructureModifier<UUID> getUUIDs()
      Retrieves a read/write structure for every UUID field.
      Returns:
      A modifier for every UUID field.
    • getStringArrays

      public StructureModifier<String[]> getStringArrays()
      Retrieves a read/write structure for every String array field.
      Returns:
      A modifier for every String array field.
    • getByteArrays

      public StructureModifier<byte[]> getByteArrays()
      Retrieves a read/write structure for every byte array field.
      Returns:
      A modifier for every byte array field.
    • getByteArraySerializer

      public StreamSerializer getByteArraySerializer()
      Retrieve a serializer for reading and writing ItemStacks stored in a byte array.
      Returns:
      A instance of the serializer.
    • getIntegerArrays

      public StructureModifier<int[]> getIntegerArrays()
      Retrieves a read/write structure for every int array field.
      Returns:
      A modifier for every int array field.
    • getShortArrays

      public StructureModifier<short[]> getShortArrays()
      Retrieves a read/write structure for every short array field.
      Returns:
      A modifier for every short array field.
    • getItemModifier

      public StructureModifier<org.bukkit.inventory.ItemStack> getItemModifier()
      Retrieves a read/write structure for ItemStack.

      This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.

      Returns:
      A modifier for ItemStack fields.
    • getItemArrayModifier

      public StructureModifier<org.bukkit.inventory.ItemStack[]> getItemArrayModifier()
      Retrieves a read/write structure for arrays of ItemStacks.

      This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.

      Returns:
      A modifier for ItemStack array fields.
    • getItemListModifier

      public StructureModifier<List<org.bukkit.inventory.ItemStack>> getItemListModifier()
      Retrieves a read/write structure for lists of ItemStacks.

      This modifier will automatically marshal between the Bukkit ItemStack and the internal Minecraft ItemStack.

      Returns:
      A modifier for ItemStack list fields.
    • getStatisticMaps

      public StructureModifier<Map<WrappedStatistic,Integer>> getStatisticMaps()
      Retrieve a read/write structure for maps of statistics.

      Note that you must write back the changed map to persist it.

      Returns:
      A modifier for maps of statistics.
    • getWorldTypeModifier

      public StructureModifier<org.bukkit.WorldType> getWorldTypeModifier()
      Retrieves a read/write structure for the world type enum.

      This modifier will automatically marshal between the Bukkit world type and the internal Minecraft world type.

      Returns:
      A modifier for world type fields.
    • getDataWatcherModifier

      public StructureModifier<WrappedDataWatcher> getDataWatcherModifier()
      Retrieves a read/write structure for data watchers.
      Returns:
      A modifier for data watchers.
    • getEntityModifier

      public StructureModifier<org.bukkit.entity.Entity> getEntityModifier(@Nonnull org.bukkit.World world)
      Retrieves a read/write structure for entity objects.

      Note that entities are transmitted by integer ID, and the type may not be enough to distinguish between entities and other values. Thus, this structure modifier MAY return null or invalid entities for certain fields. Using the correct index is essential.

      Parameters:
      world - - the world each entity is currently occupying.
      Returns:
      A modifier entity types.
    • getEntityModifier

      public StructureModifier<org.bukkit.entity.Entity> getEntityModifier(@Nonnull PacketEvent event)
      Retrieves a read/write structure for entity objects.

      Note that entities are transmitted by integer ID, and the type may not be enough to distinguish between entities and other values. Thus, this structure modifier MAY return null or invalid entities for certain fields. Using the correct index is essential.

      Parameters:
      event - - the original packet event.
      Returns:
      A modifier entity types.
    • getEntityTypeModifier

      public StructureModifier<org.bukkit.entity.EntityType> getEntityTypeModifier()
      Retrieves a read/write structure for entity types
      Returns:
      A modifier for an EntityType.
    • getBlockPositionModifier

      public StructureModifier<BlockPosition> getBlockPositionModifier()
      Retrieves a read/write structure for block positions.
      Returns:
      A modifier for a BlockPosition.
    • getRegistrableModifier

      public StructureModifier<WrappedRegistrable> getRegistrableModifier(@NotNull @NotNull Class<?> registrableClass)
      Retrieves a read/write structure for registrable objects.
      Parameters:
      registrableClass - The registrable object's class.
      Returns:
      A modifier for a registrable objects.
      See Also:
    • getBlockEntityTypeModifier

      public StructureModifier<WrappedRegistrable> getBlockEntityTypeModifier()
      Retrieves a read/write structure for BlockEntityType.
      Returns:
      A modifier for a BlockEntityType.
    • getChunkCoordIntPairs

      public StructureModifier<ChunkCoordIntPair> getChunkCoordIntPairs()
      Retrieves a read/write structure for wrapped ChunkCoordIntPairs.
      Returns:
      A modifier for ChunkCoordIntPair.
    • getNbtModifier

      public StructureModifier<NbtBase<?>> getNbtModifier()
      Retrieves a read/write structure for NBT classes.
      Returns:
      A modifier for NBT classes.
    • getListNbtModifier

      public StructureModifier<List<NbtBase<?>>> getListNbtModifier()
      Retrieves a read/write structure for lists of NBT classes.
      Returns:
      A modifier for lists of NBT classes.
    • getVectors

      public StructureModifier<org.bukkit.util.Vector> getVectors()
      Retrieves a read/write structure for Vectors.
      Returns:
      A modifier for Vectors.
    • getAttributeCollectionModifier

      public StructureModifier<List<WrappedAttribute>> getAttributeCollectionModifier()
      Retrieves a read/write structure for collections of attribute snapshots.

      This modifier will automatically marshal between the visible ProtocolLib WrappedAttribute and the internal Minecraft AttributeSnapshot.

      Returns:
      A modifier for AttributeSnapshot collection fields.
    • getBlockPositionCollectionModifier

      public StructureModifier<List<BlockPosition>> getBlockPositionCollectionModifier()
      Retrieves a read/write structure for collections of chunk positions.

      This modifier will automatically marshal between the visible ProtocolLib BlockPosition and the internal Minecraft BlockPosition.

      Returns:
      A modifier for ChunkPosition list fields.
    • getWatchableCollectionModifier

      public StructureModifier<List<WrappedWatchableObject>> getWatchableCollectionModifier()
      Retrieves a read/write structure for collections of watchable objects before Minecraft 1.19.3.

      This modifier will automatically marshal between the visible WrappedWatchableObject and the internal Minecraft WatchableObject.

      Returns:
      A modifier for watchable object list fields.
    • getDataValueCollectionModifier

      public StructureModifier<List<WrappedDataValue>> getDataValueCollectionModifier()
      Retrieves a read/write structure for collections of data values for Minecraft 1.19.3 or later.
      Returns:
      A modifier for data values.
    • getBlocks

      public StructureModifier<org.bukkit.Material> getBlocks()
      Retrieves a read/write structure for block fields.

      This modifier will automatically marshal between Material and the internal Minecraft Block.

      Returns:
      A modifier for GameProfile fields.
    • getGameProfiles

      public StructureModifier<WrappedGameProfile> getGameProfiles()
      Retrieves a read/write structure for game profiles in Minecraft 1.7.2.

      This modifier will automatically marshal between WrappedGameProfile and the internal Minecraft GameProfile.

      Returns:
      A modifier for GameProfile fields.
    • getBlockData

      public StructureModifier<WrappedBlockData> getBlockData()
      Retrieves a read/write structure for BlockData in Minecraft 1.8.

      This modifier will automatically marshal between WrappedBlockData and the internal Minecraft IBlockData.

      Returns:
      A modifier for BlockData fields.
    • getBlockDataArrays

      public StructureModifier<WrappedBlockData[]> getBlockDataArrays()
      Retrieves a read/write structure for IBlockData arrays in Minecraft 1.16.2+
      Returns:
      A modifier for IBlockData array fields
    • getMultiBlockChangeInfoArrays

      public StructureModifier<MultiBlockChangeInfo[]> getMultiBlockChangeInfoArrays()
      Retrieves a read/write structure for MultiBlockChangeInfo arrays in Minecraft 1.8.

      This modifier will automatically marshal between MultiBlockChangeInfo and the internal Minecraft MultiBlockChangeInfo.

      Returns:
      A modifier for BlockData fields.
    • getChatComponents

      public StructureModifier<WrappedChatComponent> getChatComponents()
      Retrieves a read/write structure for chat components in Minecraft 1.7.2.

      This modifier will automatically marshal between WrappedChatComponent and the internal Minecraft IChatBaseComponent.

      Returns:
      A modifier for ChatComponent fields.
    • getChatComponentArrays

      public StructureModifier<WrappedChatComponent[]> getChatComponentArrays()
      Retrieves a read/write structure for arrays of chat components.

      This modifier will automatically marshal between WrappedChatComponent and the internal Minecraft IChatBaseComponent (1.9.2 and below) or the internal NBTCompound (1.9.4 and up).

      Note that in 1.9.4 and up this modifier only works properly with sign tile entities.

      Returns:
      A modifier for ChatComponent array fields.
    • getServerPings

      public StructureModifier<WrappedServerPing> getServerPings()
      Retrieve a read/write structure for the ServerPing fields in the following packet:
      Returns:
      A modifier for ServerPing fields.
    • getPlayerInfoDataLists

      public StructureModifier<List<PlayerInfoData>> getPlayerInfoDataLists()
      Retrieve a read/write structure for the PlayerInfoData list fields in the following packet:
      Returns:
      A modifier for PlayerInfoData list fields.
    • getProtocols

      public StructureModifier<PacketType.Protocol> getProtocols()
      Retrieve a read/write structure for the Protocol enum in 1.7.2.
      Returns:
      A modifier for Protocol enum fields.
    • getClientCommands

      public StructureModifier<EnumWrappers.ClientCommand> getClientCommands()
      Retrieve a read/write structure for the ClientCommand enum in 1.7.2.
      Returns:
      A modifier for ClientCommand enum fields.
    • getChatVisibilities

      public StructureModifier<EnumWrappers.ChatVisibility> getChatVisibilities()
      Retrieve a read/write structure for the ChatVisibility enum in 1.7.2.
      Returns:
      A modifier for ChatVisibility enum fields.
    • getDifficulties

      public StructureModifier<EnumWrappers.Difficulty> getDifficulties()
      Retrieve a read/write structure for the Difficulty enum in 1.7.2.
      Returns:
      A modifier for Difficulty enum fields.
    • getEntityUseActions

      public StructureModifier<EnumWrappers.EntityUseAction> getEntityUseActions()
      Retrieve a read/write structure for the EntityUse enum in 1.7.2.
      Returns:
      A modifier for EntityUse enum fields.
    • getEnumEntityUseActions

      public StructureModifier<WrappedEnumEntityUseAction> getEnumEntityUseActions()
      Retrieves a read/write structure for the EntityUseAction class in the UseEntity packet sent by the client for 1.17 and above.
      Returns:
      A modifier for EntityUseAction class fields.
    • getGameModes

      Retrieve a read/write structure for the NativeGameMode enum in 1.7.2.
      Returns:
      A modifier for NativeGameMode enum fields.
    • getResourcePackStatus

      public StructureModifier<EnumWrappers.ResourcePackStatus> getResourcePackStatus()
      Retrieve a read/write structure for the ResourcePackStatus enum in 1.8.
      Returns:
      A modifier for ResourcePackStatus enum fields.
    • getPlayerInfoAction

      public StructureModifier<EnumWrappers.PlayerInfoAction> getPlayerInfoAction()
      Retrieve a read/write structure for the PlayerInfo enum in 1.8.
      Returns:
      A modifier for PlayerInfoAction enum fields.
    • getPlayerInfoActions

      public StructureModifier<Set<EnumWrappers.PlayerInfoAction>> getPlayerInfoActions()
      Retrieve a read/write structure for an EnumSet of PlayerInfos.
      Returns:
      A modifier for an EnumSet of PlayerInfo fields.
    • getTitleActions

      public StructureModifier<EnumWrappers.TitleAction> getTitleActions()
      Retrieve a read/write structure for the TitleAction enum in 1.8.
      Returns:
      A modifier for TitleAction enum fields.
    • getWorldBorderActions

      public StructureModifier<EnumWrappers.WorldBorderAction> getWorldBorderActions()
      Retrieve a read/write structure for the WorldBorderAction enum in 1.8.
      Returns:
      A modifier for WorldBorderAction enum fields.
    • getCombatEvents

      Retrieve a read/write structure for the CombatEventType enum in 1.8.
      Returns:
      A modifier for CombatEventType enum fields.
    • getPlayerDigTypes

      public StructureModifier<EnumWrappers.PlayerDigType> getPlayerDigTypes()
      Retrieve a read/write structure for the PlayerDigType enum in 1.8.
      Returns:
      A modifier for PlayerDigType enum fields.
    • getPlayerActions

      public StructureModifier<EnumWrappers.PlayerAction> getPlayerActions()
      Retrieve a read/write structure for the PlayerAction enum in 1.8.
      Returns:
      A modifier for PlayerAction enum fields.
    • getScoreboardActions

      public StructureModifier<EnumWrappers.ScoreboardAction> getScoreboardActions()
      Retrieve a read/write structure for the ScoreboardAction enum in 1.8.
      Returns:
      A modifier for ScoreboardAction enum fields.
    • getParticles

      public StructureModifier<EnumWrappers.Particle> getParticles()
      Retrieve a read/write structure for the Particle enum in 1.8-1.12. NOTE: This will produce undesirable results in 1.13
      Returns:
      A modifier for Particle enum fields.
    • getNewParticles

      public StructureModifier<WrappedParticle> getNewParticles()
      Retrieve a read/write structure for ParticleParams in 1.13
      Returns:
      A modifier for ParticleParam fields.
    • getEffectTypes

      public StructureModifier<org.bukkit.potion.PotionEffectType> getEffectTypes()
      Retrieve a read/write structure for the MobEffectList class in 1.9.
      Returns:
      A modifier for MobEffectList fields.
    • getSoundCategories

      public StructureModifier<EnumWrappers.SoundCategory> getSoundCategories()
      Retrieve a read/write structure for the SoundCategory enum in 1.9.
      Returns:
      A modifier for SoundCategory enum fields.
    • getHolders

      public <T> StructureModifier<T> getHolders(Class<?> genericType, EquivalentConverter<T> converter)
      Retrieve a read/write structure for a Holder<T> in 1.19.3.
      Type Parameters:
      T - Bukkit type
      Parameters:
      genericType - NMS type of T
      converter - Converter from genericType to T
      Returns:
      A modifier for Holder fields
    • getSoundEffects

      public StructureModifier<org.bukkit.Sound> getSoundEffects()
      Retrieve a read/write structure for the SoundEffect enum in 1.9.
      Returns:
      A modifier for SoundEffect enum fields.
    • getItemSlots

      public StructureModifier<EnumWrappers.ItemSlot> getItemSlots()
      Retrieve a read/write structure for the ItemSlot enum in 1.9.
      Returns:
      A modifier for ItemSlot enum fields.
    • getHands

      Retrieve a read/write structure for the Hand enum in 1.9.
      Returns:
      A modifier for Hand enum fields.
    • getDirections

      public StructureModifier<EnumWrappers.Direction> getDirections()
      Retrieve a read/write structure for the Direction enum in 1.10.
      Returns:
      A modifier for Direction enum fields.
    • getChatTypes

      public StructureModifier<EnumWrappers.ChatType> getChatTypes()
      Retrieve a read/write structure for the ChatType enum in 1.12.
      Returns:
      A modifier for ChatType enum fields.
    • getDisplaySlots

      public StructureModifier<EnumWrappers.DisplaySlot> getDisplaySlots()
      Retrieve a read/write structure for the DisplaySlot enum in 1.20.2.
      Returns:
      A modifier for DisplaySlot enum fields.
    • getRenderTypes

      public StructureModifier<EnumWrappers.RenderType> getRenderTypes()
      Retrieve a read/write structure for the RenderType enum.
      Returns:
      A modifier for RenderType enum fields.
    • getChatFormattings

      public StructureModifier<EnumWrappers.ChatFormatting> getChatFormattings()
      Retrieve a read/write structure for the ChatFormatting enum.
      Returns:
      A modifier for ChatFormatting enum fields.
    • getOptionalTeamParameters

      public StructureModifier<Optional<WrappedTeamParameters>> getOptionalTeamParameters()
      Retrieve a read/write structure for optional team parameters in 1.17+.
      Returns:
      A modifier for optional team parameters fields.
    • getNumberFormats

      public StructureModifier<WrappedNumberFormat> getNumberFormats()
      Retrieve a read/write structure for the NumberFormat class in 1.20.4+.
      Returns:
      A modifier for NumberFormat fields.
    • getMinecraftKeys

      public StructureModifier<MinecraftKey> getMinecraftKeys()
      Retrieve a read/write structure for the MinecraftKey class.
      Returns:
      A modifier for MinecraftKey fields.
    • getCustomPacketPayloads

      public StructureModifier<CustomPacketPayloadWrapper> getCustomPacketPayloads()
      Retrieve a read/write structure for custom packet payloads (available since Minecraft 1.20.2).
      Returns:
      A modifier for CustomPacketPayloads fields.
    • getDimensions

      @Deprecated public StructureModifier<Integer> getDimensions()
      Deprecated.
      Retrieve a read/write structure for dimension IDs in 1.13.1+
      Returns:
      A modifier for dimension IDs
    • getDimensionTypes

      public StructureModifier<org.bukkit.World> getDimensionTypes()
    • getMerchantRecipeLists

      public StructureModifier<List<org.bukkit.inventory.MerchantRecipe>> getMerchantRecipeLists()
      Retrieve a read/write structure for the MerchantRecipeList class.
      Returns:
      A modifier for MerchantRecipeList fields.
    • getSlotStackPairLists

      public StructureModifier<List<Pair<EnumWrappers.ItemSlot,org.bukkit.inventory.ItemStack>>> getSlotStackPairLists()
      Retrieve a read/write structure for ItemSlot/ItemStack pair lists in 1.16+
      Returns:
      The Structure Modifier
    • getMovingBlockPositions

      public StructureModifier<MovingObjectPositionBlock> getMovingBlockPositions()
      Retrieve a read/write structure for MovingObjectPositionBlock in 1.16+
      Returns:
      The Structure Modifier
    • getWorldKeys

      public StructureModifier<org.bukkit.World> getWorldKeys()
      Retrieve a read/write structure for World ResourceKeys in 1.16+
      Returns:
      The Structure Modifier
    • getSectionPositions

      public StructureModifier<BlockPosition> getSectionPositions()
      Retrieve a read/write structure for SectionPositions in 1.16.2+
      Returns:
      The Structure Modifier
    • getGameStateIDs

      public StructureModifier<Integer> getGameStateIDs()
      Retrieve a read/write structure for Game State IDs in 1.16+
      Returns:
      The Structure Modifier
    • getIntLists

      public StructureModifier<List<Integer>> getIntLists()
    • getUUIDLists

      public StructureModifier<List<UUID>> getUUIDLists()
    • getInstants

      public StructureModifier<Instant> getInstants()
      Retrieve a read/write structure for Instants in (mostly for use in 1.19+)
      Returns:
      The Structure Modifier
    • getProfilePublicKeys

      public StructureModifier<WrappedProfilePublicKey> getProfilePublicKeys()
      Retrieve a read/write structure for profile public keys in 1.19
      Returns:
      The Structure Modifier
    • getProfilePublicKeyData

      Retrieve a read/write structure for profile public key data in 1.19
      Returns:
      The Structure Modifier
    • getRemoteChatSessionData

      public StructureModifier<WrappedRemoteChatSessionData> getRemoteChatSessionData()
      Retrieves read/write structure for remote chat session data in 1.19.3
      Returns:
      The Structure Modifier
    • getLevelChunkData

      Retrieve a read/write structure for LevelChunkPacketData in 1.18+
      Returns:
      The Structure Modifier
    • getLightUpdateData

      public StructureModifier<WrappedLevelChunkData.LightData> getLightUpdateData()
      Retrieve a read/write structure for LightUpdatePacketData in 1.18+
      Returns:
      The Structure Modifier
    • getLoginSignatures

      public StructureModifier<Either<byte[],WrappedSaltedSignature>> getLoginSignatures()
      Returns:
      read/write structure for login encryption packets
    • getSignatures

      public StructureModifier<WrappedSaltedSignature> getSignatures()
      Returns:
      read/writer structure direct access to salted signature data like chat messages
    • getMessageSignatures

      public StructureModifier<WrappedMessageSignature> getMessageSignatures()
      Returns:
      read/writer structure direct access to unsalted signature data for example in chat message (since 1.19.3)
    • getClientIntents

      public StructureModifier<EnumWrappers.ClientIntent> getClientIntents()
      Retrieve a read/write structure for the ClientIntent enum used in Handshake/SetProtocol packet
      Returns:
      A modifier for Protocol enum fields.
    • getEithers

      public <L, R> StructureModifier<Either<L,R>> getEithers(EquivalentConverter<L> leftConverter, EquivalentConverter<R> rightConverter)
      Type Parameters:
      L - left data type after converting from NMS
      R - right data type after converting from NMS
      Parameters:
      leftConverter - converter for left values
      rightConverter - converter for right values
      Returns:
      ProtocolLib's read/write structure for Mojang either structures
    • getMaps

      public <K, V> StructureModifier<Map<K,V>> getMaps(EquivalentConverter<K> keyConverter, EquivalentConverter<V> valConverter)
      Retrieve a read/write structure for the Map class.
      Type Parameters:
      K - Key param
      V - Value param
      Parameters:
      keyConverter - Converter for map keys
      valConverter - Converter for map values
      Returns:
      A modifier for Map fields.
      See Also:
    • getSets

      public <E> StructureModifier<Set<E>> getSets(EquivalentConverter<E> converter)
      Retrieve a read/write structure for the Set class.
      Type Parameters:
      E - Element param
      Parameters:
      converter - Converter for elements
      Returns:
      A modifier for Set fields
      See Also:
    • getLists

      public <E> StructureModifier<List<E>> getLists(EquivalentConverter<E> converter)
      Retrieve a read/write structure for the List class.
      Type Parameters:
      E - Element param
      Parameters:
      converter - Converter for elements
      Returns:
      A modifier for List fields
    • getEnumModifier

      public <T extends Enum<T>> StructureModifier<T> getEnumModifier(Class<T> enumClass, Class<?> nmsClass)
      Retrieve a read/write structure for an enum. This allows for the use of user-created enums that may not exist in ProtocolLib. The specific (user created) enum constants must match up perfectly with their generic (NMS) counterparts.
      Parameters:
      enumClass - The specific Enum class
      nmsClass - The generic Enum class
      Returns:
      The modifier
    • getEnumModifier

      public <T extends Enum<T>> StructureModifier<T> getEnumModifier(Class<T> enumClass, int index)
      Retrieve a read/write structure for an enum. This method is for convenience, see getEnumModifier(Class, Class) for more information.
      Parameters:
      enumClass - The specific Enum class
      index - Index of the generic Enum
      Returns:
      The modifier
      See Also:
    • getOptionals

      public <T> StructureModifier<Optional<T>> getOptionals(EquivalentConverter<T> converter)
      Retrieve a read/write structure for an optional, passing the value of the optional field through the given converter if present.
      Type Parameters:
      T - The inner type of the optional
      Parameters:
      converter - Converter for internal element of optional, if present
      Returns:
      The modifier
    • getPacketBundles

      public StructureModifier<Iterable<PacketContainer>> getPacketBundles()