mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 22:41:30 +11:00
81044440dd
## Description Created a new CollisionShape struct for blocks (was previously an [f64; 6]). ## Test Plan Explain the steps necessary to test your changes. If you used a playground, include the code in the details below. Steps: 1. Run the following code <details> <summary>Playground</summary> ```rust use valence_block; fn main() { let shapes = valence_block::BlockState::STONE.collision_shapes(); println!("{:?}", shapes.collect::<Vec<_>>()); // [CollisionShape { min_x: 0.0, min_y: 0.0, min_z: 0.0, max_x: 1.0, max_y: 1.0, max_z: 1.0 }] let shapes = valence_block::BlockState::OAK_STAIRS.collision_shapes(); println!("{:?}", shapes.collect::<Vec<_>>()); // [CollisionShape { min_x: 0.0, min_y: 0.0, min_z: 0.0, max_x: 1.0, max_y: 0.5, max_z: 1.0 }, CollisionShape { min_x: 0.0, min_y: 0.5, min_z: 0.0, max_x: 1.0, max_y: 1.0, max_z: 0.5 }] } ``` </details> |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml | ||
README.md |
valence_block
Everything related to Minecraft blocks. Primarily concerned with the [BlockState
] type.