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

implement anvil and enchantment table inventorys #269

Merged
merged 6 commits into from
Feb 27, 2023

Conversation

cooltexture1
Copy link
Contributor

The inventorys are working at this stage but some of the code especially for the enchantment table is a mess. I will clean it up soon. If there are problems in the way i implemented these or bugs, let me know. This is some progress to #2

	new file:   src/inventory/enchanting_table_inventory.rs
	modified:   src/inventory/mod.rs
	modified:   src/render/inventory.rs
	modified:   src/server/mod.rs
	modified:   src/ui/mod.rs
version of on_resize for all inventorys
	modified:   protocol/src/types/mod.rs
	modified:   src/inventory/anvil_inventory.rs
	modified:   src/inventory/chest_inventory.rs
	modified:   src/inventory/crafting_table_inventory.rs
	modified:   src/inventory/dropper_inventory.rs
	modified:   src/inventory/enchanting_table_inventory.rs
	modified:   src/inventory/furnace_inventory.rs
	modified:   src/inventory/mod.rs
	modified:   src/inventory/player_inventory.rs
	modified:   src/render/hud.rs
@terrarier2111
Copy link
Member

Is this still in work or did you just forget to un-draft it?

@cooltexture1 cooltexture1 marked this pull request as ready for review February 24, 2023 21:45
@cooltexture1
Copy link
Contributor Author

yes, now it should be ready for review

pub enum Material {
Air, // 1.7.10 (id: 0, stack: 0)| 1.13 (id: 9648)
#[default]
Air, // 1.7.10 (id: 0, stack: 0)| 1.13 (id: 9648)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you shift this comment back?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried doing this already, but for some reason cargo fmt shifts this one line forward every time it is run.

0 => update_level_required(0, self),
1 => update_level_required(1, self),
2 => update_level_required(2, self),
3 => (),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment explaining why this has no action associated with it?

_ => warn!("the server sent invalid data for the enchanting table"),
}

// this fixes a bug in mc protocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit vague, could you elaborate on that?

@terrarier2111
Copy link
Member

This is really cool, thanks!

@terrarier2111 terrarier2111 merged commit 7b66db2 into Lea-fish:main Feb 27, 2023
@cooltexture1 cooltexture1 deleted the inventorys branch February 27, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants