Package net.mcreator.minecraft
Class ElementUtil
java.lang.Object
net.mcreator.minecraft.ElementUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<DataListEntry> getAllBooleanGameRules
(Workspace workspace) static List
<DataListEntry> getAllNumberGameRules
(Workspace workspace) static String[]
getAllSounds
(Workspace workspace) static String[]
getDataListAsStringArray
(String dataList) static String[]
getProceduresOfType
(Workspace workspace, VariableType type) Returns an array with the names of procedures that return the given variable typestatic List
<DataListEntry> loadAllAchievements
(Workspace workspace) static List
<DataListEntry> loadAllBiomes
(Workspace workspace) static List
<DataListEntry> loadAllEnchantments
(Workspace workspace) static List
<DataListEntry> loadAllEntities
(Workspace workspace) static List
<DataListEntry> loadAllFluids
(Workspace workspace) static List
<DataListEntry> loadAllParticles
(Workspace workspace) static List
<MItemBlock> loadAllPOIBlocks
(Workspace workspace) Returns list of blocks attached to a POI for this workspacestatic List
<DataListEntry> loadAllPotionEffects
(Workspace workspace) static List
<DataListEntry> loadAllPotions
(Workspace workspace) static List
<DataListEntry> loadAllSpawnableEntities
(Workspace workspace) Returns all the spawnable entities, which include custom living entities and entities marked as "spawnable" in the data listsstatic List
<DataListEntry> loadAllTabs
(Workspace workspace) static List
<DataListEntry> loadAllVillagerProfessions
(Workspace workspace) static List
<DataListEntry> loadArrowProjectiles
(Workspace workspace) loadBasicGUIs
(Workspace workspace) loadBlocks
(Workspace workspace) Loads all mod elements and all Minecraft blocks without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ...loadBlocksAndItems
(Workspace workspace) Loads all mod elements and all Minecraft elements (blocks and items) without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ...loadBlocksAndItemsAndPotions
(Workspace workspace) Loads all mod elements and all Minecraft elements (blocks and items) without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ...loadBlocksAndItemsAndTags
(Workspace workspace) Loads all mod elements and all Minecraft elements (blocks and items), including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...)loadBlocksAndItemsAndTagsAndPotions
(Workspace workspace) Loads all mod elements and all Minecraft elements (blocks and items), including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) This list also provides potions from both Minecraft elements and mod elementsloadBlocksAndTags
(Workspace workspace) Loads all mod elements and all Minecraft blocks, including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...)static List
<DataListEntry> loadCustomEntities
(Workspace workspace) static List
<DataListEntry> loadDataListAndElements
(Workspace workspace, String dataList, boolean sorted, String typeFilter, String... customEntryProviders) Loads a list of entries, with optional custom entries from the given mod element types, and with an optional filter for the entry type.static String[]
static List
<DataListEntry> loadEntityDataListFromCustomEntity
(Workspace workspace, String entityName, Class<? extends PropertyData<?>> type) static List
<DataListEntry> static List
<DataListEntry> static List
<DataListEntry> static Predicate
<DataListEntry> typeMatches
(String type) Provides a predicate to check the type of data list entries
-
Constructor Details
-
ElementUtil
public ElementUtil()
-
-
Method Details
-
typeMatches
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
-
loadDataListAndElements
public static List<DataListEntry> loadDataListAndElements(Workspace workspace, String dataList, boolean sorted, @Nullable String typeFilter, @Nullable String... customEntryProviders) Loads a list of entries, with optional custom entries from the given mod element types, and with an optional filter for the entry type.NOTE: custom entries cannot specify a type yet, so the type filter will remove any custom entry
- Parameters:
workspace
- The current workspacedataList
- The datalist from which to load the entriessorted
- Whether the list should be sorted alphabeticallytypeFilter
- If present, only entries whose type matches this parameter are loadedcustomEntryProviders
- The string id of the mod element types that provide custom entries- Returns:
- All entries from the given data list and the given mod element types, matching the optional filter
-
loadBlocksAndItemsAndTags
Loads all mod elements and all Minecraft elements (blocks and items), including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...)- Returns:
- All Blocks and Items from both Minecraft and custom elements with or without metadata
-
loadBlocksAndItemsAndTagsAndPotions
Loads all mod elements and all Minecraft elements (blocks and items), including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) This list also provides potions from both Minecraft elements and mod elements- Returns:
- All Blocks and Items and Potions from both Minecraft and custom elements with or without metadata
-
loadBlocksAndItemsAndPotions
Loads all mod elements and all Minecraft elements (blocks and items) without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ... are loaded, without wildcard wood element This list also provides potions from both Minecraft elements and mod elements- Returns:
- All Blocks and Items and Potions from both Minecraft and custom elements with or without metadata
-
loadBlocksAndItems
Loads all mod elements and all Minecraft elements (blocks and items) without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ... are loaded, without wildcard wood element- Returns:
- All Blocks and Items from both Minecraft and custom elements with or without metadata
-
loadBlocks
Loads all mod elements and all Minecraft blocks without elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...) so only oak wood, birch wood, ... are loaded, without wildcard wood element- Returns:
- All Blocks from both Minecraft and custom elements with or without metadata
-
loadBlocksAndTags
Loads all mod elements and all Minecraft blocks, including elements that are wildcard elements to subtypes (wood -> oak wood, birch wood, ...)- Returns:
- All Blocks from both Minecraft and custom elements with or without metadata
-
loadAllAchievements
-
loadAllTabs
-
loadAllBiomes
-
loadAllEnchantments
-
loadMaterials
-
loadMapColors
-
loadEnchantmentTypes
-
loadAllEntities
-
loadAllSpawnableEntities
Returns all the spawnable entities, which include custom living entities and entities marked as "spawnable" in the data lists- Parameters:
workspace
- The workspace from which to gather the entities- Returns:
- All entities that can be spawned
-
loadCustomEntities
-
loadEntityDataListFromCustomEntity
-
loadAllParticles
-
loadAllPotionEffects
-
loadAllPotions
-
loadAllVillagerProfessions
-
loadAllPOIBlocks
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
-
getAllBooleanGameRules
-
getAllNumberGameRules
-
loadAllFluids
-
getAllSounds
-
loadStepSounds
-
loadArrowProjectiles
-
loadDirections
-
loadBasicGUIs
-
getDataListAsStringArray
-
getProceduresOfType
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
-