Class ParticleSpawnerProvider

java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.client.particle.ParticleSpawnerProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider

public abstract class ParticleSpawnerProvider extends Object implements net.minecraft.data.DataProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider

    net.minecraft.data.DataProvider.Factory<T>
  • Field Summary

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParticleSpawnerProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int lifetime)
    Creates and adds a new ParticleSpawnerBuilder.
    builder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime)
    Creates and adds a new ParticleSpawnerBuilder.
    abstract void
    generate(net.minecraft.core.HolderLookup.Provider provider)
    Override this to generate your objects.
     
    run(net.minecraft.data.CachedOutput output)
     

    Methods inherited from class Object

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

    • ParticleSpawnerProvider

      public ParticleSpawnerProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId)
      Parameters:
      output - The PackOutput to use. Get this from GatherDataEvent.
      lookupProvider - The lookup CompletableFuture to use. Get this from GatherDataEvent.
      modId - Your mod id.
  • Method Details

    • run

      public CompletableFuture<?> run(net.minecraft.data.CachedOutput output)
      Specified by:
      run in interface net.minecraft.data.DataProvider
    • getName

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

      public abstract void generate(net.minecraft.core.HolderLookup.Provider provider)
      Override this to generate your objects.
      Parameters:
      provider - The HolderLookup.Provider provided by the system. Use this to perform registry lookups if needed.
    • builder

      public ParticleSpawnerBuilder builder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime)
      Creates and adds a new ParticleSpawnerBuilder.
      Parameters:
      id - The id of the ParticleSpawner.
      particle - The spawned particles' ParticleOptions.
      count - The spawned particle count.
      minLifetime - The min lifetime of the spawned particles.
      maxLifetime - The max lifetime of the spawned particles.
      Returns:
      The new ParticleSpawnerBuilder.
    • builder

      public ParticleSpawnerBuilder builder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int lifetime)
      Creates and adds a new ParticleSpawnerBuilder.
      Parameters:
      id - The id of the ParticleSpawner.
      particle - The spawned particles' ParticleOptions.
      count - The spawned particle count.
      lifetime - The lifetime of the spawned particles.
      Returns:
      The new ParticleSpawnerBuilder.