From 37f9f1c6feda676be30bef31291eaed2a5fc82ce Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 2 Oct 2022 14:52:48 -0500 Subject: add jumping --- azalea-world/src/entity/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'azalea-world/src') diff --git a/azalea-world/src/entity/mod.rs b/azalea-world/src/entity/mod.rs index b9c273f0..37474d1d 100644 --- a/azalea-world/src/entity/mod.rs +++ b/azalea-world/src/entity/mod.rs @@ -260,6 +260,10 @@ pub struct EntityData { pub dimensions: EntityDimensions, /// The bounding box of the entity. This is more than just width and height, unlike dimensions. pub bounding_box: AABB, + + /// Whether the entity will try to jump every tick + /// (equivalent to the space key being held down in vanilla). + pub jumping: bool, } impl EntityData { @@ -291,6 +295,8 @@ impl EntityData { // TODO: have this be based on the entity type bounding_box: dimensions.make_bounding_box(&pos), dimensions, + + jumping: false, } } -- cgit v1.2.3