Class NPCRegistryVillagers

java.lang.Object
com.pixelmonmod.pixelmon.entities.npcs.registry.NPCRegistryVillagers

public class NPCRegistryVillagers extends Object
  • Constructor Details

    • NPCRegistryVillagers

      public NPCRegistryVillagers()
  • Method Details

    • getNext

      public GeneralNPCData getNext(String index)
      Gets the next NPC in the list from a current one.
      Parameters:
      index - The index of the currently selected NPC.
      Returns:
      The next NPC in the list from the current one.
    • getData

      public GeneralNPCData getData(String id)
      Gets NPC data by ID.
      Parameters:
      id - The ID of the NPC data to get.
      Returns:
      The NPC data corresponding to the ID, or null if there are no matches.
    • getRandom

      public GeneralNPCData getRandom()
      Gets a random chatting NPC type.
      Returns:
      A random chatting NPC type.
    • getTranslatedData

      public GeneralNPCData getTranslatedData(String langCode, String id)
      Retrieves chatting NPC data for a specific chatting NPC type.
      Parameters:
      langCode - The lang code to translate strings with.
      id - The type of chatting NPC to get data for.
      Returns:
      Chatting NPC data for the specified chatting NPC type.
    • getTranslatedName

      public String getTranslatedName(String langCode, String id, int index)
      Gets a specific translated name for a specific type of chatting NPC.
      Parameters:
      langCode - The lang code to translate the name with.
      id - The type of chatting NPC to get a name for.
      index - The index of the name to get.
      Returns:
      The specified name for the chatting NPC.
    • getTranslatedChat

      public String[] getTranslatedChat(String langCode, String id, int index)
      Gets a specific translated set of dialogue for a specific type of chatting NPC.
      Parameters:
      langCode - The lang code to translate the dialogue with.
      id - The type of chatting NPC to get dialogue for.
      index - The index of the set of dialogue to get.
      Returns:
      The specified dialogue for the chatting NPC.