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> loadAllAttributes
(Workspace workspace) static List
<DataListEntry> loadAllBiomes
(Workspace workspace) static List
<DataListEntry> loadAllConfiguredFeatures
(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> loadAnimations
(Workspace workspace) static List
<DataListEntry> loadArrowProjectiles
(Workspace workspace) loadBasicGUIs
(Workspace workspace) 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, ...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, ...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, ...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, ...).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.loadBlocksAndTags
(Workspace workspace) Loads all mod elements and all Minecraft blocks, including those that are wildcard elements to subtypes (wood: oak wood, cherry 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[]
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
-
loadBlocksAndItems
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
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
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
-
loadBlocksAndTags
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
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
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
-
loadAllAchievements
-
loadAllTabs
-
loadAllBiomes
-
loadAllEnchantments
-
loadMaterials
-
loadMapColors
-
loadAnimations
-
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
-
loadAllAttributes
-
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
-
loadAllConfiguredFeatures
-
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
-