From d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:51:30 -0600 Subject: Rename Instance to World (#304) --- azalea-physics/src/fluids.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'azalea-physics/src/fluids.rs') diff --git a/azalea-physics/src/fluids.rs b/azalea-physics/src/fluids.rs index fa6a1586..73ee7ddb 100644 --- a/azalea-physics/src/fluids.rs +++ b/azalea-physics/src/fluids.rs @@ -8,7 +8,7 @@ use azalea_core::{ }; use azalea_entity::{HasClientLoaded, LocalEntity, Physics, Position}; use azalea_registry::builtin::BlockKind; -use azalea_world::{Instance, InstanceContainer, InstanceName}; +use azalea_world::{World, WorldName, Worlds}; use bevy_ecs::prelude::*; use crate::collision::legacy_blocks_motion; @@ -16,13 +16,13 @@ use crate::collision::legacy_blocks_motion; #[allow(clippy::type_complexity)] pub fn update_in_water_state_and_do_fluid_pushing( mut query: Query< - (&mut Physics, &Position, &InstanceName), + (&mut Physics, &Position, &WorldName), (With, With), >, - instance_container: Res, + worlds: Res, ) { - for (mut physics, position, instance_name) in &mut query { - let Some(world_lock) = instance_container.get(instance_name) else { + for (mut physics, position, world_name) in &mut query { + let Some(world_lock) = worlds.get(world_name) else { continue; }; let world = world_lock.read(); @@ -41,7 +41,7 @@ pub fn update_in_water_state_and_do_fluid_pushing( .registries .dimension_type .map - .get(&**instance_name) + .get(&**world_name) .and_then(|i| i.ultrawarm) .unwrap_or_default(); let lava_push_factor = if is_ultrawarm { @@ -60,7 +60,7 @@ pub fn update_in_water_state_and_do_fluid_pushing( } fn update_in_water_state_and_do_water_current_pushing( physics: &mut Physics, - world: &Instance, + world: &World, _position: Position, ) { // TODO: implement vehicles and boats @@ -86,7 +86,7 @@ fn update_in_water_state_and_do_water_current_pushing( fn update_fluid_height_and_do_fluid_pushing( physics: &mut Physics, - world: &Instance, + world: &World, checking_fluid: FluidKind, fluid_push_factor: f64, ) -> bool { @@ -180,7 +180,7 @@ pub fn update_swimming() { } // FlowingFluid.getFlow -pub fn get_fluid_flow(fluid: &FluidState, world: &Instance, pos: BlockPos) -> Vec3 { +pub fn get_fluid_flow(fluid: &FluidState, world: &World, pos: BlockPos) -> Vec3 { let mut z_flow: f64 = 0.; let mut x_flow: f64 = 0.; @@ -244,7 +244,7 @@ pub fn get_fluid_flow(fluid: &FluidState, world: &Instance, pos: BlockPos) -> Ve // i don't really get what this is for fn is_solid_face( fluid: &FluidState, - world: &Instance, + world: &World, adjacent_pos: BlockPos, direction: Direction, ) -> bool { @@ -269,7 +269,7 @@ fn is_solid_face( fn is_face_sturdy( _block_state: BlockState, - _world: &Instance, + _world: &World, _pos: BlockPos, _direction: Direction, ) -> bool { -- cgit v1.2.3