Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.5 #127

Merged
merged 16 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
i love codecs :D i am not going insane :D mojang's java is very reada…
…ble :D
  • Loading branch information
mat-1 committed Apr 15, 2024
commit 2ead339b246dc50326c64fa57861a3ad28167c44
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions azalea-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ bevy_ecs = "0.13.0"
bevy_log = { version = "0.13.0", optional = true }
bevy_tasks = "0.13.0"
bevy_time = "0.13.0"
azalea-inventory = { path = "../azalea-inventory", version = "0.9.0" }
derive_more = { version = "0.99.17", features = ["deref", "deref_mut"] }
futures = "0.3.30"
tracing = "0.1.40"
Expand All @@ -39,7 +38,6 @@ regex = "1.10.3"
thiserror = "^1.0.57"
tokio = { version = "^1.36.0", features = ["sync"] }
uuid = "^1.7.0"
azalea-entity = { version = "0.9.0", path = "../azalea-entity" }
serde_json = "1.0.113"
serde = "1.0.196"
minecraft_folder_path = "0.1.2"
Expand Down
16 changes: 8 additions & 8 deletions azalea-client/src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ impl InventoryComponent {
&mut new_carried,
slot_item_count,
);
let max_stack_size = i8::min(
let max_stack_size = i32::min(
new_carried.kind.max_stack_size(),
i8::min(
i32::min(
new_carried.kind.max_stack_size(),
slot.kind.max_stack_size(),
),
Expand Down Expand Up @@ -391,7 +391,7 @@ impl InventoryComponent {
};
if self.menu().may_place(source_slot_index, target_item) {
let source_max_stack = self.menu().max_stack_size(source_slot_index);
if target_slot.count() > source_max_stack as i8 {
if target_slot.count() > source_max_stack as i32 {
// if there's more than the max stack size in the target slot

let target_slot = self.menu_mut().slot_mut(target_slot_index).unwrap();
Expand Down Expand Up @@ -449,7 +449,7 @@ impl InventoryComponent {
ThrowClick::All { .. } => slot_item.count,
};

let _dropping = slot_item.split(dropping_count as u8);
let _dropping = slot_item.split(dropping_count as u32);
// player.drop(dropping, true);
}
ClickOperation::PickupAll(PickupAllClick {
Expand Down Expand Up @@ -492,7 +492,7 @@ impl InventoryComponent {
let checking_slot = self.menu_mut().slot_mut(i).unwrap();

let taken_item =
checking_slot.split(checking_slot.count() as u8);
checking_slot.split(checking_slot.count() as u32);

// now extend the carried item
let target_slot = &mut self.carried;
Expand Down Expand Up @@ -537,7 +537,7 @@ fn can_item_quick_replace(
return false;
};

if !item.is_same_item_and_nbt(target_slot) {
if !item.is_same_item_and_components(target_slot) {
return false;
}
let count = target_slot.count as u16
Expand All @@ -553,10 +553,10 @@ fn get_quick_craft_slot_count(
quick_craft_slots: &HashSet<u16>,
quick_craft_kind: &QuickCraftKind,
item: &mut ItemSlotData,
slot_item_count: i8,
slot_item_count: i32,
) {
item.count = match quick_craft_kind {
QuickCraftKind::Left => item.count / quick_craft_slots.len() as i8,
QuickCraftKind::Left => item.count / quick_craft_slots.len() as i32,
QuickCraftKind::Right => 1,
QuickCraftKind::Middle => item.kind.max_stack_size(),
};
Expand Down
4 changes: 3 additions & 1 deletion azalea-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![doc = include_str!("../README.md")]
#![feature(lazy_cell)]
#![feature(trait_upcasting)]
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

Expand All @@ -10,10 +11,11 @@ pub mod cursor3d;
pub mod delta;
pub mod difficulty;
pub mod direction;
pub mod entity;
pub mod game_type;
pub mod inventory;
pub mod math;
pub mod objectives;
pub mod particle;
pub mod position;
pub mod registry_holder;
pub mod resource_location;
Expand Down
6 changes: 3 additions & 3 deletions azalea-entity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ pub mod mining;
mod plugin;

use self::attributes::AttributeInstance;
pub use attributes::Attributes;
use azalea_block::BlockState;
use azalea_core::{
use crate::{
aabb::AABB,
math,
position::{BlockPos, ChunkPos, Vec3},
resource_location::ResourceLocation,
};
pub use attributes::Attributes;
use azalea_block::BlockState;
use azalea_world::{ChunkStorage, InstanceName};
use bevy_ecs::{bundle::Bundle, component::Component};
pub use data::*;
Expand Down
2 changes: 0 additions & 2 deletions azalea-inventory/README.md

This file was deleted.

Loading
Loading