Skip to main content

Particle

Enum Particle 

Source
pub enum Particle {
Show 125 variants AngryVillager, Bubble, SulfurBubbles, NoxiousGas, NoxiousGasCloud, Cloud, CopperFireFlame, Crit, DamageIndicator, DrippingLava, FallingLava, LandingLava, DrippingWater, FallingWater, ElderGuardian, EnchantedHit, Enchant, EndRod, ExplosionEmitter, Explosion, Gust, SmallGust, GustEmitterLarge, GustEmitterSmall, SonicBoom, Firework, Fishing, Flame, Infested, CherryLeaves, PaleOakLeaves, SculkSoul, SculkChargePop, SoulFireFlame, Soul, HappyVillager, Composter, Heart, PauseMobGrowth, ResetMobGrowth, ItemSlime, ItemCobweb, ItemSnowball, LargeSmoke, Lava, Mycelium, Note, Poof, Portal, Rain, Smoke, WhiteSmoke, Sneeze, Spit, SquidInk, SweepAttack, TotemOfUndying, Underwater, Splash, Witch, BubblePop, CurrentDown, BubbleColumnUp, Nautilus, Dolphin, CampfireCosySmoke, CampfireSignalSmoke, DrippingHoney, FallingHoney, LandingHoney, FallingNectar, FallingSporeBlossom, Ash, CrimsonSpore, WarpedSpore, SporeBlossomAir, DrippingObsidianTear, FallingObsidianTear, LandingObsidianTear, ReversePortal, WhiteAsh, SmallFlame, Snowflake, DrippingDripstoneLava, FallingDripstoneLava, DrippingDripstoneWater, FallingDripstoneWater, GlowSquidInk, Glow, WaxOn, WaxOff, ElectricSpark, Scrape, EggCrack, DustPlume, TrialSpawnerDetection, TrialSpawnerDetectionOminous, VaultConnection, OminousSpawning, RaidOmen, TrialOmen, Firefly, SulfurCubeGoo, Block(BlockParticleData), BlockMarker(BlockMarkerParticleData), Geyser(GeyserParticleData), GeyserBase(GeyserBaseParticleData), GeyserPoof(GeyserPoofParticleData), GeyserPlume(GeyserPlumeParticleData), DragonBreath(DragonBreathParticleData), Dust(DustParticleData), DustColorTransition(DustColorTransitionParticleData), Effect(EffectParticleData), EntityEffect(EntityEffectParticleData), FallingDust(FallingDustParticleData), TintedLeaves(TintedLeavesParticleData), SculkCharge(SculkChargeParticleData), Flash(FlashParticleData), InstantEffect(InstantEffectParticleData), Item(ItemParticleData), Vibration(VibrationParticleData), Trail(TrailParticleData), Shriek(ShriekParticleData), DustPillar(DustPillarParticleData), BlockCrumble(BlockCrumbleParticleData),
}
Expand description

A particle type ID bound to exactly the payload required by that type.

Unit variants encode only their registry ID. Data variants encode the registry ID followed by their dedicated payload structure, preventing particle IDs and payload layouts from being mismatched in memory.

See the official particle protocol table.

Variants§

§

AngryVillager

The minecraft:angry_villager particle (type ID 0) with no payload.

§

Bubble

The minecraft:bubble particle (type ID 3) with no payload.

§

SulfurBubbles

The minecraft:sulfur_bubbles particle (type ID 4) with no payload.

§

NoxiousGas

The minecraft:noxious_gas particle (type ID 5) with no payload.

§

NoxiousGasCloud

The minecraft:noxious_gas_cloud particle (type ID 6) with no payload.

§

Cloud

The minecraft:cloud particle (type ID 11) with no payload.

§

CopperFireFlame

The minecraft:copper_fire_flame particle (type ID 12) with no payload.

§

Crit

The minecraft:crit particle (type ID 13) with no payload.

§

DamageIndicator

The minecraft:damage_indicator particle (type ID 14) with no payload.

§

DrippingLava

The minecraft:dripping_lava particle (type ID 16) with no payload.

§

FallingLava

The minecraft:falling_lava particle (type ID 17) with no payload.

§

LandingLava

The minecraft:landing_lava particle (type ID 18) with no payload.

§

DrippingWater

The minecraft:dripping_water particle (type ID 19) with no payload.

§

FallingWater

The minecraft:falling_water particle (type ID 20) with no payload.

§

ElderGuardian

The minecraft:elder_guardian particle (type ID 24) with no payload.

§

EnchantedHit

The minecraft:enchanted_hit particle (type ID 25) with no payload.

§

Enchant

The minecraft:enchant particle (type ID 26) with no payload.

§

EndRod

The minecraft:end_rod particle (type ID 27) with no payload.

§

ExplosionEmitter

The minecraft:explosion_emitter particle (type ID 29) with no payload.

§

Explosion

The minecraft:explosion particle (type ID 30) with no payload.

§

Gust

The minecraft:gust particle (type ID 31) with no payload.

§

SmallGust

The minecraft:small_gust particle (type ID 32) with no payload.

§

GustEmitterLarge

The minecraft:gust_emitter_large particle (type ID 33) with no payload.

§

GustEmitterSmall

The minecraft:gust_emitter_small particle (type ID 34) with no payload.

§

SonicBoom

The minecraft:sonic_boom particle (type ID 35) with no payload.

§

Firework

The minecraft:firework particle (type ID 37) with no payload.

§

Fishing

The minecraft:fishing particle (type ID 38) with no payload.

§

Flame

The minecraft:flame particle (type ID 39) with no payload.

§

Infested

The minecraft:infested particle (type ID 40) with no payload.

§

CherryLeaves

The minecraft:cherry_leaves particle (type ID 41) with no payload.

§

PaleOakLeaves

The minecraft:pale_oak_leaves particle (type ID 42) with no payload.

§

SculkSoul

The minecraft:sculk_soul particle (type ID 44) with no payload.

§

SculkChargePop

The minecraft:sculk_charge_pop particle (type ID 46) with no payload.

§

SoulFireFlame

The minecraft:soul_fire_flame particle (type ID 47) with no payload.

§

Soul

The minecraft:soul particle (type ID 48) with no payload.

§

HappyVillager

The minecraft:happy_villager particle (type ID 50) with no payload.

§

Composter

The minecraft:composter particle (type ID 51) with no payload.

§

Heart

The minecraft:heart particle (type ID 52) with no payload.

§

PauseMobGrowth

The minecraft:pause_mob_growth particle (type ID 57) with no payload.

§

ResetMobGrowth

The minecraft:reset_mob_growth particle (type ID 58) with no payload.

§

ItemSlime

The minecraft:item_slime particle (type ID 59) with no payload.

§

ItemCobweb

The minecraft:item_cobweb particle (type ID 60) with no payload.

§

ItemSnowball

The minecraft:item_snowball particle (type ID 61) with no payload.

§

LargeSmoke

The minecraft:large_smoke particle (type ID 62) with no payload.

§

Lava

The minecraft:lava particle (type ID 63) with no payload.

§

Mycelium

The minecraft:mycelium particle (type ID 64) with no payload.

§

Note

The minecraft:note particle (type ID 65) with no payload.

§

Poof

The minecraft:poof particle (type ID 66) with no payload.

§

Portal

The minecraft:portal particle (type ID 67) with no payload.

§

Rain

The minecraft:rain particle (type ID 68) with no payload.

§

Smoke

The minecraft:smoke particle (type ID 69) with no payload.

§

WhiteSmoke

The minecraft:white_smoke particle (type ID 70) with no payload.

§

Sneeze

The minecraft:sneeze particle (type ID 71) with no payload.

§

Spit

The minecraft:spit particle (type ID 72) with no payload.

§

SquidInk

The minecraft:squid_ink particle (type ID 73) with no payload.

§

SweepAttack

The minecraft:sweep_attack particle (type ID 74) with no payload.

§

TotemOfUndying

The minecraft:totem_of_undying particle (type ID 75) with no payload.

§

Underwater

The minecraft:underwater particle (type ID 76) with no payload.

§

Splash

The minecraft:splash particle (type ID 77) with no payload.

§

Witch

The minecraft:witch particle (type ID 78) with no payload.

§

BubblePop

The minecraft:bubble_pop particle (type ID 79) with no payload.

§

CurrentDown

The minecraft:current_down particle (type ID 80) with no payload.

§

BubbleColumnUp

The minecraft:bubble_column_up particle (type ID 81) with no payload.

§

Nautilus

The minecraft:nautilus particle (type ID 82) with no payload.

§

Dolphin

The minecraft:dolphin particle (type ID 83) with no payload.

§

CampfireCosySmoke

The minecraft:campfire_cosy_smoke particle (type ID 84) with no payload.

§

CampfireSignalSmoke

The minecraft:campfire_signal_smoke particle (type ID 85) with no payload.

§

DrippingHoney

The minecraft:dripping_honey particle (type ID 86) with no payload.

§

FallingHoney

The minecraft:falling_honey particle (type ID 87) with no payload.

§

LandingHoney

The minecraft:landing_honey particle (type ID 88) with no payload.

§

FallingNectar

The minecraft:falling_nectar particle (type ID 89) with no payload.

§

FallingSporeBlossom

The minecraft:falling_spore_blossom particle (type ID 90) with no payload.

§

Ash

The minecraft:ash particle (type ID 91) with no payload.

§

CrimsonSpore

The minecraft:crimson_spore particle (type ID 92) with no payload.

§

WarpedSpore

The minecraft:warped_spore particle (type ID 93) with no payload.

§

SporeBlossomAir

The minecraft:spore_blossom_air particle (type ID 94) with no payload.

§

DrippingObsidianTear

The minecraft:dripping_obsidian_tear particle (type ID 95) with no payload.

§

FallingObsidianTear

The minecraft:falling_obsidian_tear particle (type ID 96) with no payload.

§

LandingObsidianTear

The minecraft:landing_obsidian_tear particle (type ID 97) with no payload.

§

ReversePortal

The minecraft:reverse_portal particle (type ID 98) with no payload.

§

WhiteAsh

The minecraft:white_ash particle (type ID 99) with no payload.

§

SmallFlame

The minecraft:small_flame particle (type ID 100) with no payload.

§

Snowflake

The minecraft:snowflake particle (type ID 101) with no payload.

§

DrippingDripstoneLava

The minecraft:dripping_dripstone_lava particle (type ID 102) with no payload.

§

FallingDripstoneLava

The minecraft:falling_dripstone_lava particle (type ID 103) with no payload.

§

DrippingDripstoneWater

The minecraft:dripping_dripstone_water particle (type ID 104) with no payload.

§

FallingDripstoneWater

The minecraft:falling_dripstone_water particle (type ID 105) with no payload.

§

GlowSquidInk

The minecraft:glow_squid_ink particle (type ID 106) with no payload.

§

Glow

The minecraft:glow particle (type ID 107) with no payload.

§

WaxOn

The minecraft:wax_on particle (type ID 108) with no payload.

§

WaxOff

The minecraft:wax_off particle (type ID 109) with no payload.

§

ElectricSpark

The minecraft:electric_spark particle (type ID 110) with no payload.

§

Scrape

The minecraft:scrape particle (type ID 111) with no payload.

§

EggCrack

The minecraft:egg_crack particle (type ID 113) with no payload.

§

DustPlume

The minecraft:dust_plume particle (type ID 114) with no payload.

§

TrialSpawnerDetection

The minecraft:trial_spawner_detection particle (type ID 115) with no payload.

§

TrialSpawnerDetectionOminous

The minecraft:trial_spawner_detection_ominous particle (type ID 116) with no payload.

§

VaultConnection

The minecraft:vault_connection particle (type ID 117) with no payload.

§

OminousSpawning

The minecraft:ominous_spawning particle (type ID 119) with no payload.

§

RaidOmen

The minecraft:raid_omen particle (type ID 120) with no payload.

§

TrialOmen

The minecraft:trial_omen particle (type ID 121) with no payload.

§

Firefly

The minecraft:firefly particle (type ID 123) with no payload.

§

SulfurCubeGoo

The minecraft:sulfur_cube_goo particle (type ID 124) with no payload.

§

Block(BlockParticleData)

The minecraft:block particle (type ID 1).

§

BlockMarker(BlockMarkerParticleData)

The minecraft:block_marker particle (type ID 2).

§

Geyser(GeyserParticleData)

The minecraft:geyser particle (type ID 7).

§

GeyserBase(GeyserBaseParticleData)

The minecraft:geyser_base particle (type ID 8).

§

GeyserPoof(GeyserPoofParticleData)

The minecraft:geyser_poof particle (type ID 9).

§

GeyserPlume(GeyserPlumeParticleData)

The minecraft:geyser_plume particle (type ID 10).

§

DragonBreath(DragonBreathParticleData)

The minecraft:dragon_breath particle (type ID 15).

§

Dust(DustParticleData)

The minecraft:dust particle (type ID 21).

§

DustColorTransition(DustColorTransitionParticleData)

The minecraft:dust_color_transition particle (type ID 22).

§

Effect(EffectParticleData)

The minecraft:effect particle (type ID 23).

§

EntityEffect(EntityEffectParticleData)

The minecraft:entity_effect particle (type ID 28).

§

FallingDust(FallingDustParticleData)

The minecraft:falling_dust particle (type ID 36).

§

TintedLeaves(TintedLeavesParticleData)

The minecraft:tinted_leaves particle (type ID 43).

§

SculkCharge(SculkChargeParticleData)

The minecraft:sculk_charge particle (type ID 45).

§

Flash(FlashParticleData)

The minecraft:flash particle (type ID 49).

§

InstantEffect(InstantEffectParticleData)

The minecraft:instant_effect particle (type ID 53).

§

Item(ItemParticleData)

The minecraft:item particle (type ID 54).

§

Vibration(VibrationParticleData)

The minecraft:vibration particle (type ID 55).

§

Trail(TrailParticleData)

The minecraft:trail particle (type ID 56).

§

Shriek(ShriekParticleData)

The minecraft:shriek particle (type ID 112).

§

DustPillar(DustPillarParticleData)

The minecraft:dust_pillar particle (type ID 118).

§

BlockCrumble(BlockCrumbleParticleData)

The minecraft:block_crumble particle (type ID 122).

Implementations§

Source§

impl Particle

Source

pub const fn type_id(&self) -> i32

Returns the numeric ID in the minecraft:particle_type registry.

Source

pub const fn registry_name(&self) -> &'static str

Returns the namespaced particle registry name.

Source

pub const fn is_unit(&self) -> bool

Returns whether this particle has no type-specific payload.

Trait Implementations§

Source§

impl Clone for Particle

Source§

fn clone(&self) -> Particle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Particle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Particle

Source§

fn eq(&self, other: &Particle) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Particle

Source§

impl TypeCodec for Particle

Source§

fn encode(&self, writer: &mut impl Write) -> Result<(), CodecError>

Encodes this value to the writer.
Source§

fn decode(reader: &mut impl Read) -> Result<Self, CodecError>

Decodes this value from the reader.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ContextualCodec for T
where T: TypeCodec,

Source§

fn encode_with_context( &self, writer: &mut impl Write, _context: &Context, ) -> Result<(), CodecError>

Encodes this value using context supplied by its enclosing structure.
Source§

fn decode_with_context( reader: &mut impl Read, _context: &Context, ) -> Result<T, CodecError>
where T: Sized,

Decodes this value using context supplied by its enclosing structure.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.