Interface IPrefabSpellManager
- All Superinterfaces:
Map<net.minecraft.resources.ResourceLocation,IPrefabSpell>
public interface IPrefabSpellManager
extends Map<net.minecraft.resources.ResourceLocation,IPrefabSpell>
Interface representing a prefab spell manager.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap<net.minecraft.resources.ResourceLocation,IPrefabSpell> getData()getOptional(@Nullable net.minecraft.resources.ResourceLocation id) getOrDefault(@Nullable net.minecraft.resources.ResourceLocation id, Supplier<IPrefabSpell> defaultSupplier) Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
getOrDefault
IPrefabSpell getOrDefault(@Nullable @Nullable net.minecraft.resources.ResourceLocation id, Supplier<IPrefabSpell> defaultSupplier) - Parameters:
id- The id of the prefab spell to get.defaultSupplier- The fallback value.- Returns:
- The prefab spell with the given id, or the fallback value if there is no prefab spell with that id available.
-
getOptional
- Parameters:
id- The id of the prefab spell to get.- Returns:
- An optional containing the prefab spell with the given id, or an empty optional if there is no prefab spell with that id available.
-
getData
Map<net.minecraft.resources.ResourceLocation,IPrefabSpell> getData()- Returns:
- All registered prefab spells with their associated ids.
-