Minecraft PC IP: play.cubecraft.net

caspar1500

Novice Member
Jun 24, 2017
45
18
58
21
Hello i am developing an anti-cheat and i found something out.
Most of the time with the hack step (makes you walk up a block like a slab) this value comes: 0.4200000000000017
So i made this:

@EventHandler
void StepCheck(PlayerMoveEvent e) {

Player p = e.getPlayer();

double y = e.getTo().getY() - e.getFrom().getY();

if(y == 0.4200000000000017) {
p.teleport(e.getFrom());
p.sendMessage("You got deteceted for step.");
}
}

It is working great.
You may implement this in the sentiel code or edit it a bit.
Hope this helps!
 
  • Like
Reactions: _AmazingWays_

Lezappen

Forum Expert
Jan 30, 2016
2,174
3,887
338
Toulouse (France)
Hello i am developing an anti-cheat and i found something out.
Most of the time with the hack step (makes you walk up a block like a slab) this value comes: 0.4200000000000017
So i made this:

@EventHandler
void StepCheck(PlayerMoveEvent e) {

Player p = e.getPlayer();

double y = e.getTo().getY() - e.getFrom().getY();

if(y == 0.4200000000000017) {
p.teleport(e.getFrom());
p.sendMessage("You got deteceted for step.");
}
}

It is working great.
You may implement this in the sentiel code or edit it a bit.
Hope this helps!
Checking for a specific value like this makes it really easy to be patched, all they have to do is change that value from: 0.4200000000000017 to 0.4200000000000016
This also probably only works against one specific client.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
21
you can try ik its easy to patch but it is already that value for like 2 updates. So i dont know if they will change that value.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
21
Checking for a specific value like this makes it really easy to be patched, all they have to do is change that value from: 0.4200000000000017 to 0.4200000000000016
This also probably only works against one specific client.
i tested it out on 2 clients and it didn't work at all so idk if all the clients have it. But it are atleast 2 clients steps away. So you can add and try it.
 

caspar1500

Novice Member
Jun 24, 2017
45
18
58
21
and this is btw the way i got that value:

@EventHandler
void TellMove(PlayerMoveEvent e) {

Player p = e.getPlayer();

double x = e.getTo().getX() - e.getFrom().getX();
double y = e.getTo().getY() - e.getFrom().getY();
double z = e.getTo().getZ() - e.getFrom().getZ();

p.sendMessage("X: " + Double.toString(x));
p.sendMessage("Y: " + Double.toString(y));
p.sendMessage("Z: " + Double.toString(z));
Bukkit.getConsoleSender().sendMessage("X: " + Double.toString(x));
Bukkit.getConsoleSender().sendMessage("Y: " + Double.toString(y));
Bukkit.getConsoleSender().sendMessage("Z: " + Double.toString(z));
}

It just gets the last position and that the second one subtract the new with the old to get the deffrence and than send it to the play that did it. (this is only hand for debugging and you can turn off the Bukkit.getConsoleSender().sendMessage otherwise the server will get spammen if someone walks) this code is handy for debugging and getting value's
 
Members Online

Latest posts

Latest profile posts

AnolTongi wrote on Hqteful's profile.
Genuinely thank you for everything you've done, you're very much appreciated. Hope to see you around!
LorilambtheWcubecraftian wrote on Hqteful's profile.
Thanks for all ur help as mod! Enjoy your ccg retirement!! 💛
Kazwa wrote on Hqteful's profile.
Thanks for everything!
iTz1Hamood wrote on Hqteful's profile.
Thanks for everything, Mika. It honestly won’t be the same without you. I’m wishing you all the best in whatever comes next!! You truly deserve all the good things in life 🤍 I’ll always be grateful to you. You accepted my helper app, got me here.. and that meant alooot for me. Will miss you so much!! You’ve had such a positive impact on so many of us. Take care and stay amazing 💙
llvqs wrote on Hqteful's profile.
Thanks for everything and good luck with everything! 💙🧡
Top Bottom