dev.polymodloader.api.content.particle
This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.
| Type | Kind | Description |
|---|---|---|
ParticleDefinition | record | A 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.
| Component | Type | Description |
|---|---|---|
lifetimeTicks | int | how long one particle lives |
gravity | float | downward acceleration (0 floats, 0.04 like falling dust) |
scale | float | size multiplier (1 is the game's default) |
glowing | boolean | drawn at full brightness, also in the dark |
tint | int | colour 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.
| Parameter | Type | Description |
|---|---|---|
lifetimeTicks | int | — |
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).
| Parameter | Type | Description |
|---|---|---|
value | float | — |
Returns ParticleDefinition
withScale(float)
public ParticleDefinition withScale(float value)
Since 0.1.0-alpha.4 or earlier
A copy with this size multiplier.
| Parameter | Type | Description |
|---|---|---|
value | float | — |
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.
| Parameter | Type | Description |
|---|---|---|
rgb | int | — |
Returns ParticleDefinition