java.lang.Object
com.github.minecraftschurlimods.arsmagicalegacy.api.data.PrefabSpellProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider

public abstract class PrefabSpellProvider extends Object implements net.minecraft.data.DataProvider
  • Constructor Details

    • PrefabSpellProvider

      public PrefabSpellProvider(String namespace, net.minecraft.data.DataGenerator generator)
    • PrefabSpellProvider

      public PrefabSpellProvider(String namespace, net.minecraft.data.DataGenerator generator, @Nullable @Nullable net.minecraftforge.common.data.LanguageProvider languageProvider)
  • Method Details

    • createPrefabSpells

      protected abstract void createPrefabSpells(Consumer<PrefabSpellBuilder> consumer)
    • run

      public void run(net.minecraft.data.HashCache pCache) throws IOException
      Specified by:
      run in interface net.minecraft.data.DataProvider
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in interface net.minecraft.data.DataProvider
    • addPrefabSpell

      public PrefabSpellBuilder addPrefabSpell(String id, net.minecraft.network.chat.Component name, net.minecraft.resources.ResourceLocation icon, ISpell spell)
      Adds a new prefab spell.
      Parameters:
      id - The id of the prefab spell.
      name - The name component of the prefab spell.
      icon - The icon of the prefab spell.
      spell - The spell of the prefab spell.
    • addPrefabSpell

      public PrefabSpellBuilder addPrefabSpell(String id, String name, net.minecraft.resources.ResourceLocation icon, ISpell spell)
      Adds a new prefab spell.
      Parameters:
      id - The id of the prefab spell.
      name - The name of the prefab spell.
      icon - The icon of the prefab spell.
      spell - The spell of the prefab spell.