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

Item dropping #464

Closed
wants to merge 35 commits into from
Closed

Item dropping #464

wants to merge 35 commits into from

Conversation

tomasalias
Copy link

Description

This pull request includes multiple changes across several files to enhance functionality and improve code consistency. The most important changes include adding new dependencies, extending functionality for various structs, and modifying method implementations to use more appropriate types.

Dependency Additions:

  • Added itertools dependency in Cargo.toml files to support new functionality.

Struct Enhancements:

  • Added offset method to BoundingBox struct in pumpkin-core/src/math/boundingbox.rs to allow shifting the bounding box by a given vector.
  • Implemented Default trait for Vector2 and Vector3 structs in pumpkin-core/src/math/vector2.rs and pumpkin-core/src/math/vector3.rs respectively, to provide default values.
  • Added methods to Vector3 struct for calculating horizontal length and implementing the Sum trait.
  • Introduced gravity method to EntityType enum in pumpkin-entity/src/entity_type.rs to return gravity values for different entity types.

Method Modifications:

  • Updated Click struct methods in pumpkin-inventory/src/container_click.rs to handle different slot action types using u8 instead of SlotActionType.
  • Added hotbar_mut and main_inventory_mut methods to PlayerInventory struct in pumpkin-inventory/src/player.rs for easier access to mutable inventory slots.

Protocol Updates:

  • Added CPickupItem struct in pumpkin-protocol/src/client/play/c_pickup_item.rs for handling item pickup events.
  • Modified CSetEntityMetadata and Metadata structs in pumpkin-protocol/src/client/play/c_entity_metadata.rs to require Serialize trait.

Command Execution Adjustments:

  • Updated command executors in pumpkin/src/command/commands to use Arc<Server> instead of Server for better concurrency handling.

Testing

No.

Please follow our Coding Guidelines

@tomasalias tomasalias closed this by deleting the head repository Jan 6, 2025
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.

1 participant