Interface ISpellDataManager


public interface ISpellDataManager
Interface representing a spell data manager.
  • Method Details

    • getDataForPart

      @Nullable @Nullable ISpellPartData getDataForPart(ISpellPart part)
      Parameters:
      part - The spell part to get the data for.
      Returns:
      The spell part data for the given part, or null if it is not available.
    • registerSpellIngredientType

      <T extends ISpellIngredient> void registerSpellIngredientType(net.minecraft.resources.ResourceLocation type, com.mojang.serialization.Codec<T> codec, Supplier<ISpellIngredientRenderer<T>> renderer)
      Registers a spell ingredient type.
      Type Parameters:
      T - The type of the spell ingredient.
      Parameters:
      type - The id of the spell ingredient type.
      codec - The codec to serialize/deserialize the spell ingredient.
      renderer - A supplier of the renderer (value gets cached).
    • registerSpellIngredientType

      <T extends ISpellIngredient> void registerSpellIngredientType(net.minecraft.resources.ResourceLocation type, com.mojang.serialization.Codec<T> codec, com.mojang.serialization.Codec<T> networkCodec, Supplier<ISpellIngredientRenderer<T>> renderer)
      Registers a spell ingredient type.
      Type Parameters:
      T - The type of the spell ingredient.
      Parameters:
      type - The id of the spell ingredient type.
      codec - The codec to serialize/deserialize the spell ingredient.
      networkCodec - The network codec to serialize/deserialize the spell ingredient.
      renderer - A supplier of the renderer (value gets cached).
    • getSpellIngredientCodec

      com.mojang.serialization.Codec<ISpellIngredient> getSpellIngredientCodec(net.minecraft.resources.ResourceLocation type)
      Parameters:
      type - The id of the spell ingredient type.
      Returns:
      The codec for the spell ingredient type.
    • getSpellIngredientNetworkCodec

      com.mojang.serialization.Codec<ISpellIngredient> getSpellIngredientNetworkCodec(net.minecraft.resources.ResourceLocation type)
      Parameters:
      type - The id of the spell ingredient type.
      Returns:
      The network codec for the spell ingredient type.
    • getSpellIngredientRenderer

      <T extends ISpellIngredient> ISpellIngredientRenderer<T> getSpellIngredientRenderer(net.minecraft.resources.ResourceLocation type)
      Parameters:
      type - The id of the spell ingredient type.
      Returns:
      The renderer for the spell ingredient type.