Class SpellTransformationProvider

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

public abstract class SpellTransformationProvider extends Object implements net.minecraft.data.DataProvider
Base class for spell part data generators.
  • Field Summary

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, KEY_COMPARATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpellTransformationProvider(String namespace, net.minecraft.data.DataGenerator generator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSpellTransformation(String id, net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, ISpellPart spellPart)
    Adds a new spell transformation.
    void
    addSpellTransformation(String id, net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, net.minecraft.resources.ResourceLocation spellPart)
    Adds a new spell transformation.
    protected abstract void
     
     
    void
    run(net.minecraft.data.CachedOutput pCache)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpellTransformationProvider

      public SpellTransformationProvider(String namespace, net.minecraft.data.DataGenerator generator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper)
  • Method Details

    • createSpellTransformations

      protected abstract void createSpellTransformations()
    • run

      public void run(net.minecraft.data.CachedOutput 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
    • addSpellTransformation

      public void addSpellTransformation(String id, net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, net.minecraft.resources.ResourceLocation spellPart)
      Adds a new spell transformation.
      Parameters:
      id - The id of the transformation.
      from - The block to apply the transformation to.
      to - The block state to transform to.
      spellPart - The spell part this transformation is for.
    • addSpellTransformation

      public void addSpellTransformation(String id, net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest from, net.minecraft.world.level.block.state.BlockState to, ISpellPart spellPart)
      Adds a new spell transformation.
      Parameters:
      id - The id of the transformation.
      from - The block to apply the transformation to.
      to - The block state to transform to.
      spellPart - The spell part this transformation is for.