Class ItemAbility

java.lang.Object
com.hypixel.hytale.protocol.ItemAbility

public class ItemAbility extends Object
  • Field Details

    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • slot

      @Nonnull public AbilitySlot slot
    • cooldown

      public float cooldown
    • cost

      public float cost
    • costType

      @Nonnull public AbilityCostType costType
    • weapons

      @Nullable public String[] weapons
    • weaponTagIndexes

      @Nullable public int[] weaponTagIndexes
    • abilityKeywordIndexes

      @Nullable public int[] abilityKeywordIndexes
    • requiresAnyAbilityKeywordIndexes

      @Nullable public int[] requiresAnyAbilityKeywordIndexes
    • requiresAllAbilityKeywordIndexes

      @Nullable public int[] requiresAllAbilityKeywordIndexes
    • excludesAnyAbilityKeywordIndexes

      @Nullable public int[] excludesAnyAbilityKeywordIndexes
    • onHitEffects

      @Nullable public String[] onHitEffects
    • attributes

      @Nullable public Map<String,Float> attributes
    • attributeModifiers

      @Nullable public Map<String, Modifier[]> attributeModifiers
    • cast

      public int cast
  • Constructor Details

    • ItemAbility

      public ItemAbility()
    • ItemAbility

      public ItemAbility(@Nonnull AbilitySlot slot, float cooldown, float cost, @Nonnull AbilityCostType costType, @Nullable String[] weapons, @Nullable int[] weaponTagIndexes, @Nullable int[] abilityKeywordIndexes, @Nullable int[] requiresAnyAbilityKeywordIndexes, @Nullable int[] requiresAllAbilityKeywordIndexes, @Nullable int[] excludesAnyAbilityKeywordIndexes, @Nullable String[] onHitEffects, @Nullable Map<String,Float> attributes, @Nullable Map<String, Modifier[]> attributeModifiers, int cast)
    • ItemAbility

      public ItemAbility(@Nonnull ItemAbility other)
  • Method Details

    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getSlot

      public static AbilitySlot getSlot(MemorySegment mem)
    • getSlot

      public static AbilitySlot getSlot(MemorySegment mem, int offset)
    • getCooldown

      public static float getCooldown(MemorySegment mem)
    • getCooldown

      public static float getCooldown(MemorySegment mem, int offset)
    • getCost

      public static float getCost(MemorySegment mem)
    • getCost

      public static float getCost(MemorySegment mem, int offset)
    • getCostType

      public static AbilityCostType getCostType(MemorySegment mem)
    • getCostType

      public static AbilityCostType getCostType(MemorySegment mem, int offset)
    • getWeapons

      @Nullable public static String[] getWeapons(MemorySegment mem)
    • getWeapons

      @Nullable public static String[] getWeapons(MemorySegment mem, int offset)
    • getWeaponTagIndexes

      @Nullable public static int[] getWeaponTagIndexes(MemorySegment mem)
    • getWeaponTagIndexes

      @Nullable public static int[] getWeaponTagIndexes(MemorySegment mem, int offset)
    • getAbilityKeywordIndexes

      @Nullable public static int[] getAbilityKeywordIndexes(MemorySegment mem)
    • getAbilityKeywordIndexes

      @Nullable public static int[] getAbilityKeywordIndexes(MemorySegment mem, int offset)
    • getRequiresAnyAbilityKeywordIndexes

      @Nullable public static int[] getRequiresAnyAbilityKeywordIndexes(MemorySegment mem)
    • getRequiresAnyAbilityKeywordIndexes

      @Nullable public static int[] getRequiresAnyAbilityKeywordIndexes(MemorySegment mem, int offset)
    • getRequiresAllAbilityKeywordIndexes

      @Nullable public static int[] getRequiresAllAbilityKeywordIndexes(MemorySegment mem)
    • getRequiresAllAbilityKeywordIndexes

      @Nullable public static int[] getRequiresAllAbilityKeywordIndexes(MemorySegment mem, int offset)
    • getExcludesAnyAbilityKeywordIndexes

      @Nullable public static int[] getExcludesAnyAbilityKeywordIndexes(MemorySegment mem)
    • getExcludesAnyAbilityKeywordIndexes

      @Nullable public static int[] getExcludesAnyAbilityKeywordIndexes(MemorySegment mem, int offset)
    • getOnHitEffects

      @Nullable public static String[] getOnHitEffects(MemorySegment mem)
    • getOnHitEffects

      @Nullable public static String[] getOnHitEffects(MemorySegment mem, int offset)
    • getAttributes

      @Nullable public static Map<String,Float> getAttributes(MemorySegment mem)
    • getAttributes

      @Nullable public static Map<String,Float> getAttributes(MemorySegment mem, int offset)
    • getAttributeModifiers

      @Nullable public static Map<String, Modifier[]> getAttributeModifiers(MemorySegment mem)
    • getAttributeModifiers

      @Nullable public static Map<String, Modifier[]> getAttributeModifiers(MemorySegment mem, int offset)
    • getCast

      public static int getCast(MemorySegment mem)
    • getCast

      public static int getCast(MemorySegment mem, int offset)
    • hasWeapons

      public static boolean hasWeapons(MemorySegment mem, int offset)
    • hasWeaponTagIndexes

      public static boolean hasWeaponTagIndexes(MemorySegment mem, int offset)
    • hasAbilityKeywordIndexes

      public static boolean hasAbilityKeywordIndexes(MemorySegment mem, int offset)
    • hasRequiresAnyAbilityKeywordIndexes

      public static boolean hasRequiresAnyAbilityKeywordIndexes(MemorySegment mem, int offset)
    • hasRequiresAllAbilityKeywordIndexes

      public static boolean hasRequiresAllAbilityKeywordIndexes(MemorySegment mem, int offset)
    • hasExcludesAnyAbilityKeywordIndexes

      public static boolean hasExcludesAnyAbilityKeywordIndexes(MemorySegment mem, int offset)
    • hasOnHitEffects

      public static boolean hasOnHitEffects(MemorySegment mem, int offset)
    • hasAttributes

      public static boolean hasAttributes(MemorySegment mem, int offset)
    • hasAttributeModifiers

      public static boolean hasAttributeModifiers(MemorySegment mem, int offset)
    • toObject

      public static ItemAbility toObject(MemorySegment mem)
    • toObject

      public static ItemAbility toObject(MemorySegment mem, int offset)
    • toObject

      public static ItemAbility toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one ItemAbility and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
    • computeSize

      public int computeSize()
    • clone

      public ItemAbility clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object