Skip to main content
Version: Minecraft 26.2

dev.polymodloader.api.content.particle

Generated

This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.

TypeKindDescription
ParticleDefinitionrecordA particle type.

ParticleDefinition​

record · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier

public record ParticleDefinition(int lifetimeTicks, float gravity, float scale, boolean glowing, int tint)

A particle type. Clients draw it with the sprites listed in assets/<mod id>/particles/<path>.json (textures under textures/particle/), changing sprite over its life when several are listed. Spawn it with WorldView.spawnParticles.

ComponentTypeDescription
lifetimeTicksinthow long one particle lives
gravityfloatdownward acceleration (0 floats, 0.04 like falling dust)
scalefloatsize multiplier (1 is the game's default)
glowingbooleandrawn at full brightness, also in the dark
tintintcolour multiplied into the sprite, 0xRRGGBB (0xFFFFFF keeps it)

of(int)​

public static ParticleDefinition of(int lifetimeTicks)

Since 0.1.0-alpha.4 or earlier

Lives lifetimeTicks, no gravity, default size, normal lighting, no tint.

ParameterTypeDescription
lifetimeTicksint—

Returns ParticleDefinition

withGravity(float)​

public ParticleDefinition withGravity(float value)

Since 0.1.0-alpha.4 or earlier

A copy with this downward acceleration (0 floats).

ParameterTypeDescription
valuefloat—

Returns ParticleDefinition

withScale(float)​

public ParticleDefinition withScale(float value)

Since 0.1.0-alpha.4 or earlier

A copy with this size multiplier.

ParameterTypeDescription
valuefloat—

Returns ParticleDefinition

asGlowing()​

public ParticleDefinition asGlowing()

Since 0.1.0-alpha.4 or earlier

A copy drawn at full brightness, also in the dark.

Returns ParticleDefinition

withTint(int)​

public ParticleDefinition withTint(int rgb)

Since 0.1.0-alpha.4 or earlier

A copy with this colour, 0xRRGGBB, multiplied into the sprite.

ParameterTypeDescription
rgbint—

Returns ParticleDefinition

Buy me a coffee