Class ElementUtil

java.lang.Object
net.mcreator.minecraft.ElementUtil

public class ElementUtil extends Object
  • Constructor Details

    • ElementUtil

      public ElementUtil()
  • Method Details

    • typeMatches

      public static Predicate<DataListEntry> typeMatches(String... type)
      Provides a predicate to check the type of data list entries
      Parameters:
      type - The type that the entry has to match
      Returns:
      A predicate that checks if the type matches the parameter
    • loadBlocksAndItems

      public static List<MCItem> loadBlocksAndItems(Workspace workspace)
      Loads all items (also blocks if they have item representation), but without those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...) so only oak wood, cherry wood, ... are loaded, without wildcard wood element. This will not load blocks without item representation (example fire, water, ...).
      Returns:
      All Blocks and Items from both Minecraft and custom elements with or without metadata
    • loadBlocksAndItemsAndTags

      public static List<MCItem> loadBlocksAndItemsAndTags(Workspace workspace)
      Loads all items (also blocks if they have item representation), including elements that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...). This will not load blocks without item representation (example fire, water, ...).
      Returns:
      All Blocks and Items from both Minecraft and custom elements with or without metadata
    • loadBlocks

      public static List<MCItem> loadBlocks(Workspace workspace)
      Loads all blocks without those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...) so only oak wood, cherry wood, ... are loaded, without wildcard wood element
      Returns:
      All Blocks from both Minecraft and custom elements with or without metadata
    • loadBlocksWithItemForm

      public static List<MCItem> loadBlocksWithItemForm(Workspace workspace)
      Loads all blocks with an item form, without those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...), so only oak wood, cherry wood, ... are loaded, without wildcard wood element
      Returns:
      All Blocks from both Minecraft and custom elements with or without metadata
    • loadBlocksAndTags

      public static List<MCItem> loadBlocksAndTags(Workspace workspace)
      Loads all mod elements and all Minecraft blocks, including those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...)
      Returns:
      All Blocks from both Minecraft and custom elements with or without metadata
    • loadBlocksAndItemsAndTagsAndPotions

      public static List<MCItem> loadBlocksAndItemsAndTagsAndPotions(Workspace workspace)
      Loads all items (also blocks if they have item representation), including those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...) This list also provides potions from both Minecraft elements and mod elements. This will not load blocks without item representation (example fire, water, ...).
      Returns:
      All Blocks and Items and Potions from both Minecraft and custom elements with or without metadata
    • loadBlocksAndItemsAndPotions

      public static List<MCItem> loadBlocksAndItemsAndPotions(Workspace workspace)
      Loads all items (also blocks if they have item representation), without those that are wildcard elements to subtypes (wood: oak wood, cherry wood, ...) so only oak wood, cherry wood, ... are loaded, without wildcard wood element This list also provides potions from both Minecraft elements and mod elements. This will not load blocks without item representation (example fire, water, ...).
      Returns:
      All Blocks and Items and Potions from both Minecraft and custom elements with or without metadata
    • loadEntityDataListFromCustomEntity

      public static List<String> loadEntityDataListFromCustomEntity(Workspace workspace, String entityName, Class<? extends PropertyData<?>> type)
    • loadAllPOIBlocks

      public static List<MItemBlock> loadAllPOIBlocks(Workspace workspace)
      Returns list of blocks attached to a POI for this workspace
      Parameters:
      workspace - Workspace to return for
      Returns:
      List of blocks attached to a POI for this workspace
    • loadBasicGUIs

      public static ArrayList<String> loadBasicGUIs(Workspace workspace)
    • loadAllEquipmentSlots

      public static List<DataListEntry> loadAllEquipmentSlots()
    • loadAllEquipmentSlots

      public static List<DataListEntry> loadAllEquipmentSlots(boolean addDefault)
    • getDataListAsStringArray

      public static String[] getDataListAsStringArray(String dataList)
    • getProceduresOfType

      public static String[] getProceduresOfType(Workspace workspace, VariableType type)

      Returns an array with the names of procedures that return the given variable type

      Parameters:
      workspace -

      The current workspace

      type -

      The VariableType that the procedures must return

      Returns:

      An array of strings containing the names of the procedures

    • getAllEntriesFor

      public static List<DataListEntry> getAllEntriesFor(Workspace workspace, String datalist)
    • loadAllAchievements

      public static List<DataListEntry> loadAllAchievements(Workspace workspace)
    • loadAllTabs

      public static List<DataListEntry> loadAllTabs(Workspace workspace)
    • loadAllBiomes

      public static List<DataListEntry> loadAllBiomes(Workspace workspace)
    • loadAllEnchantments

      public static List<DataListEntry> loadAllEnchantments(Workspace workspace)
    • loadAllStructures

      public static List<DataListEntry> loadAllStructures(Workspace workspace)
    • loadItemUseAnimations

      public static List<DataListEntry> loadItemUseAnimations(Workspace workspace)
    • loadAnimations

      public static List<DataListEntry> loadAnimations(Workspace workspace)
    • loadAllEntities

      public static List<DataListEntry> loadAllEntities(Workspace workspace)
    • loadAllSpawnableEntities

      public static List<DataListEntry> loadAllSpawnableEntities(Workspace workspace)
    • loadCustomEntities

      public static List<DataListEntry> loadCustomEntities(Workspace workspace)
    • loadAllParticles

      public static List<DataListEntry> loadAllParticles(Workspace workspace)
    • loadAllPotionEffects

      public static List<DataListEntry> loadAllPotionEffects(Workspace workspace)
    • loadAllVillagerProfessions

      public static List<DataListEntry> loadAllVillagerProfessions(Workspace workspace)
    • loadAllAttributes

      public static List<DataListEntry> loadAllAttributes(Workspace workspace)
    • loadAllFluids

      public static List<DataListEntry> loadAllFluids(Workspace workspace)
    • loadAllSounds

      public static List<DataListEntry> loadAllSounds(Workspace workspace)
    • loadAllConfiguredFeatures

      public static List<DataListEntry> loadAllConfiguredFeatures(Workspace workspace)
    • loadArrowProjectiles

      public static List<DataListEntry> loadArrowProjectiles(Workspace workspace)
    • getVanillaEntryProviders

      public static Map<String, Function<Workspace, Collection<DataListEntry>>> getVanillaEntryProviders()
    • getCustomEntryProviders

      public static Map<String, Function<Workspace, Collection<DataListEntry>>> getCustomEntryProviders()