aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/interact/mod.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-01-13 10:51:30 -0600
committerGitHub <noreply@github.com>2026-01-13 10:51:30 -0600
commitd5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (patch)
treeea04702f96ad170fb1d90e5ed2dc875ae8166495 /azalea-client/src/plugins/interact/mod.rs
parentefb36d5fc0fe56a98f5795c53dfa109887cd5aae (diff)
downloadazalea-drasl-d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff.tar.xz
Rename Instance to World (#304)
Diffstat (limited to 'azalea-client/src/plugins/interact/mod.rs')
-rw-r--r--azalea-client/src/plugins/interact/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea-client/src/plugins/interact/mod.rs b/azalea-client/src/plugins/interact/mod.rs
index d8f8b8b4..04986de7 100644
--- a/azalea-client/src/plugins/interact/mod.rs
+++ b/azalea-client/src/plugins/interact/mod.rs
@@ -30,7 +30,7 @@ use azalea_protocol::packets::game::{
s_swing::ServerboundSwing,
s_use_item_on::ServerboundUseItemOn,
};
-use azalea_world::Instance;
+use azalea_world::World;
use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
use tracing::warn;
@@ -140,7 +140,7 @@ impl BlockStatePredictionHandler {
}
}
- pub fn end_prediction_up_to(&mut self, seq: u32, world: &Instance) {
+ pub fn end_prediction_up_to(&mut self, seq: u32, world: &World) {
let mut to_remove = Vec::new();
for (pos, state) in &self.server_state {
if state.seq > seq {
@@ -377,10 +377,10 @@ pub fn handle_entity_interact(
///
/// If this is false, then we can interact with the block.
///
-/// Passing the inventory, block position, and instance is necessary for the
-/// adventure mode check.
+/// The world, block position, and inventory are used for the adventure mode
+/// check.
pub fn check_is_interaction_restricted(
- instance: &Instance,
+ world: &World,
block_pos: BlockPos,
game_mode: &GameMode,
inventory: &Inventory,
@@ -393,7 +393,7 @@ pub fn check_is_interaction_restricted(
let held_item = inventory.held_item();
match &held_item {
ItemStack::Present(item) => {
- let block = instance.chunks.get_block_state(block_pos);
+ let block = world.chunks.get_block_state(block_pos);
let Some(block) = block else {
// block isn't loaded so just say that it is restricted
return true;