r/minecraftclients • • 1d ago

Java - Ghost Cheating Triggerbot undetected + AI detector.

Post image

I developed an external C++ TriggerBot for Minecraft 1.21.11. Here's what I've been working on

Hey everyone! I wanted to share a project I've been working on for quite a while now.

I've developed my own external triggerbot for Minecraft Sword PvP. It runs as a standalone Windows application, meaning it's not a Minecraft mod, an injected client, or anything that modifies the game's files.

It also doesn't read Minecraft's process memory to detect opponents. The main detection system works by analyzing pixels on the screen.

What started as a really simple idea slowly turned into a much bigger C++ project. I've spent weeks experimenting with input latency, screen capture methods, Windows threads, mouse events, and different ways to make everything work together as efficiently as possible.

I'm also exploring more advanced target validation, including AI-based entity checks. That part is still experimental, while the current core detection system is pixel-based.

Right now, only four trusted people have access to the project. They've been testing it on Russian and European PvP servers while working toward higher tiers.

According to our own records, we've gone through more than 20 screenshare checks over the past month without the program being identified. Obviously, that doesn't mean it's guaranteed to be undetectable.

Anyway, here's how the project started and what I've managed to implement so far.

1. From a basic AHK script to C++

The first version was written in AutoHotkey.

It was honestly nothing special. Just a basic pixel triggerbot that checked the color in the center of the screen and clicked whenever it detected a match.

It worked, but I wasn't happy with the speed or how limited everything was.

So I decided to rewrite the whole thing in C++.

That gave me much more control over mouse input, pixel capture, Windows events, threading, and timing.

But even after that, I kept optimizing it. There were times when I spent several days trying to improve just one tiny part of the program.

2. Dual screen capture system

This is probably one of the most interesting parts of the project.

Instead of relying on a single screen capture method, I implemented two independent systems:

  • DXGI Desktop Duplication using DirectX 11.
  • BitBlt using Windows GDI.

Both run simultaneously on separate threads.

The program compares their results and uses the freshest available capture data.

The main detection system only needs to analyze a single pixel in the center of the Minecraft window.

I also implemented frame freshness checks to prevent the triggerbot from reacting to outdated capture results.

Currently, the maximum accepted age is 5 ms for DXGI and 3 ms for BitBlt, with an additional validation step before sending an automatic click.

Getting these systems to work together reliably took a surprising amount of effort.

3. Input latency experiments

This is where I've probably spent the most time.

I've tested different input methods, experimented with thread priorities, changed how mouse events are processed, and tried to minimize the delay between detecting a target and the game receiving a click.

I've also been experimenting with a custom input method I call BestInput.

In my local measurements, I observed improvements of around 4 ms compared to a basic SendInput implementation.

That's a result from my own testing, not a universal benchmark, and the source version I'm discussing here still uses SendInput.

I've also noticed some interesting results in actual PvP.

Previously, my average registered reach was usually around 2.60 to 2.75 blocks. In some of my more recent tests, I've seen values around 2.88 to 2.99.

These are personal gameplay observations, not proof that the software increases Minecraft's actual attack reach.

Still, it's one of the reasons I've become so interested in minimizing latency.

4. Custom fullscreen system

This was one of the more unusual problems I had to solve.

I wanted Minecraft to fill the entire monitor while still allowing my external application to capture pixels reliably.

So I implemented my own borderless fullscreen handling.

Pressing F11 lets the program switch the selected window into a borderless fullscreen layout.

I also added automatic window positioning, restoration of the original window state, geometry checks, and capture recalibration when switching modes.

The whole thing works externally without modifying Minecraft itself.

5. No GUI, everything controlled through hotkeys

Originally, I wanted to build a full graphical interface.

But eventually I realized that I didn't really need one.

The application has one main purpose, so I decided to keep the controls entirely keyboard and mouse based.

By default, the trigger is assigned to the middle mouse button.

Holding the mouse wheel button for around 300 ms opens the key reassignment mode. You can then assign another mouse button or keyboard key.

There's also a custom sound when the bind is changed successfully.

I implemented two activation styles:

  • A short press toggles the triggerbot on or off.
  • Holding the assigned key activates it temporarily until the key is released.

Everything can be controlled without opening a settings window.

6. Two different trigger modes

The application currently supports two different ways of handling attacks.

The regular mode takes movement keys and attack intervals into account.

The second mode is called Color Only Mode.

In this mode, the trigger reacts when a matching color newly appears in the center of the screen.

You can switch this mode using Ctrl + Shift together with your assigned activation key.

I wanted to make it possible to switch between different behaviors without having to restart the program.

7. Protection against unnecessary clicks

I didn't want the triggerbot to constantly spam clicks just because the target color was visible.

So I added several checks to make its behavior more controlled.

These include:

  • Minimum spacing between automatic clicks.
  • Fresh pixel verification before attacking.
  • Tracking the current synthetic left mouse button state.
  • Checking whether the physical left mouse button is already pressed.
  • Preventing overlapping automatic clicks.
  • Releasing synthetic input when the trigger is disabled.

The duration of each automatic click is also slightly randomized.

This made the system much more consistent and reduced unnecessary input events.

8. Compatibility with manual clicking

Another thing I wanted was to make sure the application didn't interfere with normal mouse input.

The program checks whether the user is already physically holding the left mouse button before sending its own click.

It also keeps track of previous automatic attacks and prevents overlapping input states.

This allows manual mouse control and the trigger system to coexist without constantly conflicting with each other.

9. Custom sound system

This might sound like a small detail, but I actually spent quite a bit of time on it.

I created a separate WAV audio system for different events.

It supports sounds for mouse button presses, releases, key reassignment, and volume adjustments.

The audio runs on its own thread, so playing a sound doesn't block the main detection and input system.

You can also adjust the click sound volume using Alt + mouse wheel, in increments of 10%.

Click sounds are disabled by default.

I sometimes use this system to provide audible feedback for automatic mouse input during testing and demonstrations.

10. Windows thread and process optimization

I've also spent a lot of time experimenting with how Windows schedules the application's threads.

The program can increase the priority of its own process and the active game process when the trigger is activated.

The click processing thread also adjusts its priority depending on whether the trigger is actively running.

Internally, the project uses separate capture threads, atomic variables, and event-based synchronization to coordinate different parts of the system.

Higher priorities don't automatically mean lower latency on every PC, but testing these configurations has been an important part of development.

11. Pause system

I implemented a pause feature using F8.

When paused, the program stops its active detection and automatic clicking behavior without having to close the application.

When resumed, it restores the necessary input handlers and working state.

Double tapping F8 exits the program.

It's a simple feature, but really convenient during testing.

12. Automatic calibration and window monitoring

Finally, I added quite a bit of logic to make the application handle Minecraft's window state more reliably.

When the trigger is activated, the program checks the active window and calibrates the screen capture position.

It also monitors whether the selected window is still in the foreground.

If you switch to another application, the trigger shouldn't keep processing input using the previous game's window.

Switching fullscreen modes also causes the capture system to recalibrate.

There are additional checks for window changes, input states, and capture failures.

What's next?

My main goal right now is to make the triggerbot as stable and accurate as possible for modern Minecraft Sword PvP.

I'm currently interested in improving target validation, reducing false positives, and experimenting with more advanced entity detection.

One particularly interesting problem involves invisible entities that some anticheats can place near the crosshair. I haven't fully solved that problem yet.

I also want to continue working on input latency and testing my custom input implementation.

It's kind of crazy to think that this started as a basic AutoHotkey script and eventually became a fairly large multithreaded C++ application.

For now, I'm keeping the project private while development and testing continue.

I'd really like to hear what you guys think.

Has anyone here worked on external Minecraft triggerbots in C++ or experimented with similar pixel detection systems?

I'm interested in technical feedback, ideas, and suggestions for what to improve next.

6 Upvotes

13 comments sorted by

•

u/AutoModerator 1d ago

Hey there! Welcome to r/minecraftclients

Click to join our Discord Server for faster support and community discussion.

Community tip of the week | fang be like: Community tip of the week | Use a VPN, probably

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/TwoAdministrative349 1d ago

That looks a good ui

2

u/ImportanceFuzzy3946 1d ago

just design example rn

5

u/TwoAdministrative349 1d ago

why downvote me :sad

5

u/GiveMeBlueberry 1d ago

i upvote you :steamhappy:

7

u/Zealousideal_Yak7554 1d ago

give us a tldr, no one is reading all that ;-;

3

u/Center2055 12h ago

Since OP didn't make one here is the tldr:
they made an external c++ pixel triggerbot for 1.21.11 sword pvp, no injection or memory reading. uses dxgi and bitblt, claims to have reduced input latency which apparently results in more consistent hits near 3 blocks. passed 20+ screenshares according to him, ai entity detection is still experimental and the gui is just a concept. currently private with no release date. basically an optimized pixel triggerbot with some ai stuff planned

2

u/ElegantOrange4122 18h ago

Only if it would be free...

1

u/AutoModerator 1d ago

if you want to buy alts we recommend https://localts.store for full access and NFA accounts.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/jamesfromrecord b 1h ago

Might as well just make it inject into the process, because all of this is detectable and leaves traces. Also a colorbot is nothing revolutionary. Also I don't know why you decided to explain every little detail like all of this isn't cheat development 101, and acting like you did some insane stuff.

2

u/parknich081 1d ago

ai slop

0

u/ImportanceFuzzy3946 23h ago

nop, it's my design. But i understand you, and gui not using in my trigger rn