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

public abstract class AbilityProvider extends Object implements net.minecraft.data.DataProvider
  • Field Summary

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, KEY_COMPARATOR
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    protected abstract void
     
    protected AbilityBuilder
    createAbility(net.minecraft.resources.ResourceLocation ability, Affinity affinity, net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds)
     
    protected AbilityBuilder
    createAbility(net.minecraft.resources.ResourceLocation ability, net.minecraft.resources.ResourceLocation affinity, net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds)
     
    get(net.minecraft.resources.ResourceLocation id)
     
    Collection<net.minecraft.resources.ResourceLocation>
    getAbilitiesForAffinity(net.minecraft.resources.ResourceLocation affinity)
    Get the abilities associated with the given affinity.
     
    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

    • AbilityProvider

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

    • getAbilitiesForAffinity

      public Collection<net.minecraft.resources.ResourceLocation> getAbilitiesForAffinity(net.minecraft.resources.ResourceLocation affinity)
      Get the abilities associated with the given affinity.
      Parameters:
      affinity - The affinity for which to get the abilities.
      Returns:
      The abilities for the given affinity.
    • createAbilities

      protected abstract void createAbilities(Consumer<AbilityBuilder> consumer)
    • run

      @Internal 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
    • get

      public Ability get(net.minecraft.resources.ResourceLocation id)
    • createAbility

      protected AbilityBuilder createAbility(net.minecraft.resources.ResourceLocation ability, net.minecraft.resources.ResourceLocation affinity, net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds)
      Parameters:
      ability - The id of the ability.
      affinity - The id of the ability's affinity.
      bounds - The ability's bounds.
      Returns:
      A new ability.
    • createAbility

      protected AbilityBuilder createAbility(net.minecraft.resources.ResourceLocation ability, Affinity affinity, net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds)
      Parameters:
      ability - The id of the ability.
      affinity - The ability's affinity.
      bounds - The ability's bounds.
      Returns:
      A new ability.