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
Data provider for
ParticleSpawners. Override generate(HolderLookup.Provider) to generate your entries,
and use builder(Identifier, ParticleOptions, int, int) or builder(Identifier, ParticleOptions, int, int, int) to create a new ParticleSpawnerBuilder.-
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
ConstructorsConstructorDescriptionParticleSpawnerProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId) -
Method Summary
Modifier and TypeMethodDescriptionbuilder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int lifetime) Creates and adds a newParticleSpawnerBuilder.builder(net.minecraft.resources.Identifier id, net.minecraft.core.particles.ParticleOptions particle, int count, int minLifetime, int maxLifetime) Creates and adds a newParticleSpawnerBuilder.abstract voidgenerate(net.minecraft.core.HolderLookup.Provider provider) Override this to generate your objects.getName()run(net.minecraft.data.CachedOutput output)
-
Constructor Details
-
ParticleSpawnerProvider
public ParticleSpawnerProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId) - Parameters:
output- ThePackOutputto use. Get this fromGatherDataEvent.lookupProvider- The lookupCompletableFutureto use. Get this fromGatherDataEvent.modId- Your mod id.
-
-
Method Details
-
run
- Specified by:
runin interfacenet.minecraft.data.DataProvider
-
getName
- Specified by:
getNamein interfacenet.minecraft.data.DataProvider
-
generate
public abstract void generate(net.minecraft.core.HolderLookup.Provider provider) Override this to generate your objects.- Parameters:
provider- TheHolderLookup.Providerprovided 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 newParticleSpawnerBuilder.- Parameters:
id- The id of theParticleSpawner.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 newParticleSpawnerBuilder.- Parameters:
id- The id of theParticleSpawner.particle- The spawned particles'ParticleOptions.count- The spawned particle count.lifetime- The lifetime of the spawned particles.- Returns:
- The new
ParticleSpawnerBuilder.
-