diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-01-10 16:45:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 16:45:27 -0600 |
| commit | 0d16f01571ec8315f3979eae46981e559ade1cf9 (patch) | |
| tree | ea43c32a57b0e6a67579d75a134dfbc009d09781 /azalea-world/src | |
| parent | 615d8f9d2ac56b3244d328587243301da253eafd (diff) | |
| download | azalea-drasl-0d16f01571ec8315f3979eae46981e559ade1cf9.tar.xz | |
Fluid physics (#199)
* start implementing fluid physics
* Initial implementation of fluid pushing
* different travel function in water
* bubble columns
* jumping in water
* cleanup
* change ultrawarm to be required
* fix for clippy
Diffstat (limited to 'azalea-world/src')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 3 | ||||
| -rw-r--r-- | azalea-world/src/container.rs | 8 | ||||
| -rw-r--r-- | azalea-world/src/find_blocks.rs | 2 | ||||
| -rwxr-xr-x | azalea-world/src/palette.rs | 2 | ||||
| -rw-r--r-- | azalea-world/src/world.rs | 11 |
5 files changed, 16 insertions, 10 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 94ffb362..8362385a 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -7,7 +7,8 @@ use std::{ sync::{Arc, Weak}, }; -use azalea_block::{BlockState, BlockStateIntegerRepr, FluidState}; +use azalea_block::block_state::{BlockState, BlockStateIntegerRepr}; +use azalea_block::fluid_state::FluidState; use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use azalea_core::position::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use nohash_hasher::IntMap; diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs index 0b3a13fd..7e5927e3 100644 --- a/azalea-world/src/container.rs +++ b/azalea-world/src/container.rs @@ -56,14 +56,14 @@ impl InstanceContainer { let existing = existing_lock.read(); if existing.chunks.height != height { error!( - "Shared dimension height mismatch: {} != {}", - existing.chunks.height, height, + "Shared dimension height mismatch: {} != {height}", + existing.chunks.height ); } if existing.chunks.min_y != min_y { error!( - "Shared world min_y mismatch: {} != {}", - existing.chunks.min_y, min_y, + "Shared world min_y mismatch: {} != {min_y}", + existing.chunks.min_y ); } existing_lock.clone() diff --git a/azalea-world/src/find_blocks.rs b/azalea-world/src/find_blocks.rs index ff69dd2f..6228687f 100644 --- a/azalea-world/src/find_blocks.rs +++ b/azalea-world/src/find_blocks.rs @@ -1,4 +1,4 @@ -use azalea_block::{BlockState, BlockStates}; +use azalea_block::{block_state::BlockState, BlockStates}; use azalea_core::position::{BlockPos, ChunkPos}; use crate::{iterators::ChunkIterator, palette::Palette, ChunkStorage, Instance}; diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index 269e443b..31a03f3d 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_block::BlockStateIntegerRepr; +use azalea_block::block_state::BlockStateIntegerRepr; use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_core::math; use tracing::warn; diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs index 0a09d387..298bd598 100644 --- a/azalea-world/src/world.rs +++ b/azalea-world/src/world.rs @@ -5,7 +5,8 @@ use std::{ fmt::Debug, }; -use azalea_block::{BlockState, FluidState}; +use azalea_block::fluid_state::FluidState; +use azalea_block::BlockState; use azalea_core::position::{BlockPos, ChunkPos}; use azalea_core::registry_holder::RegistryHolder; use bevy_ecs::{component::Component, entity::Entity}; @@ -88,8 +89,12 @@ pub struct Instance { /// An index of all the entities we know are in the chunks of the world pub entities_by_chunk: HashMap<ChunkPos, HashSet<Entity>>, - /// An index of Minecraft entity IDs to Azalea ECS entities. You should - /// avoid using this and instead use `azalea_entity::EntityIdIndex` + /// An index of Minecraft entity IDs to Azalea ECS entities. + /// + /// You should avoid using this (particularly if you're using swarms) and + /// instead use `azalea_entity::EntityIdIndex`, since some servers may + /// give different entity IDs for the same entities to different + /// players. pub entity_by_id: IntMap<MinecraftEntityId, Entity>, pub registries: RegistryHolder, |
