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.
  • 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

      Optional<IPrefabSpell> getOptional(@Nullable @Nullable net.minecraft.resources.ResourceLocation id)
      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.