Skip to content

Commit

Permalink
Allow holding shift while using jetpack in vector mode to make it beh…
Browse files Browse the repository at this point in the history
…ave as normal mode. (Makes pillaring easier/possible while in vector mode)
  • Loading branch information
pupnewfster committed Mar 9, 2024
1 parent 2973740 commit 7cf83a6
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -125,6 +125,10 @@ private static ItemStack getJetpack(LivingEntity entity, Predicate<ItemStack> ma
*/
static boolean handleJetpackMotion(Player player, JetpackMode mode, double thrust, BooleanSupplier ascendingSupplier) {
Vec3 motion = player.getDeltaMovement();
if (mode == JetpackMode.VECTOR && player.isShiftKeyDown()) {
//TODO: Do we want to expand holding shift to some sort of secondary behavior
mode = JetpackMode.NORMAL;
}
if ((mode == JetpackMode.NORMAL || mode == JetpackMode.VECTOR) && player.isFallFlying()) {
Vec3 forward = player.getLookAngle();
Vec3 drag = forward.scale(1.5).subtract(motion).scale(0.5);
Expand Down

0 comments on commit 7cf83a6

Please sign in to comment.