diff --git a/pumpkin/src/block/blocks/mod.rs b/pumpkin/src/block/blocks/mod.rs index d3785d66..b0b12802 100644 --- a/pumpkin/src/block/blocks/mod.rs +++ b/pumpkin/src/block/blocks/mod.rs @@ -42,15 +42,16 @@ pub async fn standard_open_container( window_type: WindowType, ) { let entity_id = player.entity_id(); - let mut open_containers = server.open_containers.write().await; // If container exists, add player to container, otherwise create new container if let Some(container_id) = server.get_container_id(location, block.clone()).await { + let mut open_containers = server.open_containers.write().await; log::debug!("Using previous standard container ID: {}", container_id); if let Some(container) = open_containers.get_mut(&u64::from(container_id)) { container.add_player(entity_id); player.open_container.store(Some(container_id.into())); } } else { + let mut open_containers = server.open_containers.write().await; let new_id = server.new_container_id(); log::debug!("Creating new standard container ID: {}", new_id); let open_container = diff --git a/pumpkin/src/server/mod.rs b/pumpkin/src/server/mod.rs index 8f87204e..050c5d8c 100644 --- a/pumpkin/src/server/mod.rs +++ b/pumpkin/src/server/mod.rs @@ -214,7 +214,6 @@ impl Server { } } } - log::error!("No container found... this should not happen."); drop(open_containers);