Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.Freecam;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.block.BlockState;
import net.minecraft.util.ActionResult;
Expand Down Expand Up @@ -41,7 +43,15 @@ private void onTick(TickEvent.Post event) {
if (mc.player.isUsingItem()) return;

if (mc.options.useKey.isPressed()) {
HitResult hitResult = mc.player.raycast(maxDistance.get(), 1f / 20f, false);
HitResult hitResult;

if (Modules.get().get(Freecam.class).isActive()) {
hitResult = mc.crosshairTarget;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raycast from the freecam position

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in any case, we are probably going to be merging #4549 to add freecam compat to clicktp

}
else {
hitResult = mc.player.raycast(maxDistance.get(), 1f / 20f, false);
}


if (hitResult.getType() == HitResult.Type.ENTITY && mc.player.interact(((EntityHitResult) hitResult).getEntity(), Hand.MAIN_HAND) != ActionResult.PASS) return;

Expand Down