diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/Trajectories.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/Trajectories.java index 5ca4ee2cda..86cc51c39e 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/Trajectories.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/Trajectories.java @@ -103,6 +103,8 @@ public class Trajectories extends Module { private final Pool vec3s = new Pool<>(Vector3d::new); private final List paths = new ArrayList<>(); + private static final double MULTISHOT_OFFSET = Math.toRadians(10); // accurate-ish offset of crossbow multishot in radians (10° degrees) + public Trajectories() { super(Categories.Render, "trajectories", "Predicts the trajectory of throwable items."); } @@ -146,10 +148,10 @@ private void calculatePath(PlayerEntity player, double tickDelta) { getEmptyPath().calculate(); if (itemStack.getItem() instanceof CrossbowItem && EnchantmentHelper.getLevel(Enchantments.MULTISHOT, itemStack) > 0) { - if (!simulator.set(player, itemStack, -10, accurate.get(), tickDelta)) return; + if (!simulator.set(player, itemStack, MULTISHOT_OFFSET, accurate.get(), tickDelta)) return; // left multishot arrow getEmptyPath().calculate(); - if (!simulator.set(player, itemStack, 10, accurate.get(), tickDelta)) return; + if (!simulator.set(player, itemStack, -MULTISHOT_OFFSET, accurate.get(), tickDelta)) return; // right multishot arrow getEmptyPath().calculate(); } } diff --git a/src/main/java/meteordevelopment/meteorclient/utils/entity/ProjectileEntitySimulator.java b/src/main/java/meteordevelopment/meteorclient/utils/entity/ProjectileEntitySimulator.java index 9e894a0a5a..555c6628ad 100644 --- a/src/main/java/meteordevelopment/meteorclient/utils/entity/ProjectileEntitySimulator.java +++ b/src/main/java/meteordevelopment/meteorclient/utils/entity/ProjectileEntitySimulator.java @@ -131,11 +131,14 @@ public boolean set(Entity entity, boolean accurate, double tickDelta) { set(entity, 0.5, 0.05, 0.8, accurate, tickDelta); } else if (entity instanceof WitherSkullEntity || entity instanceof FireballEntity || entity instanceof DragonFireballEntity) { set(entity, 0.95, 0, 0.8, accurate, tickDelta); - } - else { + } else { return false; } + if (entity.hasNoGravity()) { + this.gravity = 0; + } + return true; }