diff options
| author | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
| commit | 585b51e91a5335eae37bc5af7c0111bb2092b156 (patch) | |
| tree | c1559014df9db20dd625d9fe972d4e9f88317008 /azalea-entity/src/particle.rs | |
| parent | db793448ff8e656ad80859835edc3b89cb547dd2 (diff) | |
| download | azalea-drasl-585b51e91a5335eae37bc5af7c0111bb2092b156.tar.xz | |
more accurate mining and impl PartialEq for packets
Diffstat (limited to 'azalea-entity/src/particle.rs')
| -rw-r--r-- | azalea-entity/src/particle.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index 212d9668..a457bba2 100644 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -9,7 +9,7 @@ use bevy_ecs::component::Component; // the order of this enum must be kept in sync with ParticleKind, otherwise // we get errors parsing particles. /// A [`ParticleKind`] with data potentially attached to it. -#[derive(Component, Clone, Debug, AzBuf)] +#[derive(Component, Clone, Debug, AzBuf, PartialEq)] pub enum Particle { AngryVillager, Block(BlockParticle), @@ -260,18 +260,18 @@ impl Default for Particle { } } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct BlockParticle { pub block_state: BlockState, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct DustParticle { pub color: RgbColor, /// The scale, will be clamped between 0.01 and 4. pub scale: f32, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct DustColorTransitionParticle { pub from: RgbColor, pub to: RgbColor, @@ -279,24 +279,24 @@ pub struct DustColorTransitionParticle { pub scale: f32, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct ColorParticle { pub color: RgbColor, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct ItemParticle { pub item: ItemStack, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct VibrationParticle { pub position: PositionSource, #[var] pub ticks: u32, } -#[derive(Debug, Clone, AzBuf)] +#[derive(Debug, Clone, AzBuf, PartialEq)] pub enum PositionSource { Block(BlockPos), Entity { @@ -312,12 +312,12 @@ impl Default for PositionSource { } } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct SculkChargeParticle { pub roll: f32, } -#[derive(Debug, Clone, AzBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default, PartialEq)] pub struct ShriekParticle { #[var] pub delay: i32, // The time in ticks before the particle is displayed |
