Class Production


  • public class Production
    extends java.lang.Object
    This class contains methods related to production in the game.
    • Constructor Summary

      Constructors 
      Constructor Description
      Production()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Item> all()
      Retrieves a list of all items by iterating through the widget children and creating an item object for each.
      static Item get​(java.util.function.Predicate<Item> itemPredicate)
      Retrieves the first Item in the list that satisfies the given itemPredicate.
      static int getAmount()
      Retrieves the amount of a specific variable from the client.
      static int getCustomAmount()
      Retrieves the custom amount set by the player.
      static boolean interact​(int... ids)
      Interacts with game objects or entities based on their IDs.
      static boolean interact​(java.lang.String... names)
      Interacts with an item or non-player character (NPC) based on the provided names.
      static boolean interact​(java.util.function.Predicate<Item> itemPredicate)
      Interacts with an item based on the given predicate.
      static boolean isCustomAmountSet()
      Checks if a custom amount is set by retrieving the specific widget child and determining its visibility.
      static boolean isOpen()
      Returns a boolean value indicating whether the specified widget is open and visible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Production

        public Production()
    • Method Detail

      • isOpen

        public static boolean isOpen()
        Returns a boolean value indicating whether the specified widget is open and visible.
        Returns:
        true if the widget is open and visible, false otherwise
      • getAmount

        public static int getAmount()
        Retrieves the amount of a specific variable from the client.
        Returns:
        the amount of the variable.
      • getCustomAmount

        public static int getCustomAmount()
        Retrieves the custom amount set by the player.
        Returns:
        the custom amount as an integer value
      • isCustomAmountSet

        public static boolean isCustomAmountSet()
        Checks if a custom amount is set by retrieving the specific widget child and determining its visibility.
        Returns:
        true if a custom amount is set, false otherwise.
      • all

        public static java.util.List<Item> all()
        Retrieves a list of all items by iterating through the widget children and creating an item object for each.
        Returns:
        the list of items found
      • get

        public static Item get​(java.util.function.Predicate<Item> itemPredicate)
        Retrieves the first Item in the list that satisfies the given itemPredicate.
        Parameters:
        itemPredicate - the condition that defines the Item to be retrieved
        Returns:
        the first Item that satisfies the itemPredicate, or null if no such Item is found
      • interact

        public static boolean interact​(int... ids)
        Interacts with game objects or entities based on their IDs.
        Parameters:
        ids - the IDs of the game objects or entities to interact with
        Returns:
        true if the interaction was successful; false otherwise
      • interact

        public static boolean interact​(java.lang.String... names)
        Interacts with an item or non-player character (NPC) based on the provided names.
        Parameters:
        names - an array of names to interact with
        Returns:
        true if successfully interacted, false otherwise
      • interact

        public static boolean interact​(java.util.function.Predicate<Item> itemPredicate)
        Interacts with an item based on the given predicate.
        Parameters:
        itemPredicate - the condition that the item must satisfy
        Returns:
        true if the interaction was successful, false otherwise