diff options
| author | mat <git@matdoes.dev> | 2024-12-24 08:48:36 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-24 08:48:36 +0000 |
| commit | f03e0c22355778a9863cccb5a59d852278d60701 (patch) | |
| tree | f02e7ca3d1e975d486071934a6322d372b7c9a02 /azalea-entity/src | |
| parent | de5a53ce08de5b9d77bce99dd9ecde3171ebd74e (diff) | |
| download | azalea-drasl-f03e0c22355778a9863cccb5a59d852278d60701.tar.xz | |
fix parsing Dust particle and treat waterlogged blocks as liquid in pathfinder
Diffstat (limited to 'azalea-entity/src')
| -rwxr-xr-x | azalea-entity/src/particle.rs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index 76559e58..a8710eff 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -1,5 +1,6 @@ +use azalea_block::BlockState; use azalea_buf::AzBuf; -use azalea_core::position::BlockPos; +use azalea_core::{color::RgbColor, position::BlockPos}; use azalea_inventory::ItemStack; use azalea_registry::ParticleKind; use bevy_ecs::component::Component; @@ -251,37 +252,21 @@ impl From<ParticleKind> for Particle { #[derive(Debug, Clone, AzBuf, Default)] pub struct BlockParticle { - #[var] - pub block_state: i32, + pub block_state: BlockState, } #[derive(Debug, Clone, AzBuf, Default)] pub struct DustParticle { - /// Red value, 0-1 - pub red: f32, - /// Green value, 0-1 - pub green: f32, - /// Blue value, 0-1 - pub blue: f32, + pub color: RgbColor, /// The scale, will be clamped between 0.01 and 4. pub scale: f32, } #[derive(Debug, Clone, AzBuf, Default)] pub struct DustColorTransitionParticle { - /// Red value, 0-1 - pub from_red: f32, - /// Green value, 0-1 - pub from_green: f32, - /// Blue value, 0-1 - pub from_blue: f32, + pub from: RgbColor, + pub to: RgbColor, /// The scale, will be clamped between 0.01 and 4. pub scale: f32, - /// Red value, 0-1 - pub to_red: f32, - /// Green value, 0-1 - pub to_green: f32, - /// Blue value, 0-1 - pub to_blue: f32, } #[derive(Debug, Clone, AzBuf, Default)] |
