Minecraft PC IP: play.cubecraft.net

caspar1500

Novice Member
Jun 24, 2017
45
18
58
20
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,886
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
20
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
20
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
20
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 profile posts

My friend said he has the best texturepack.
What is THAT???
„This is a golden apple“, he said.

🤯🤯🤯

IMG_3493.jpeg
IAmEclipsy wrote on slimebuster120's profile.
Happy birthday!
Only non-staff member online. It's weird how quiet the forums gets at this time of day
Screen Shot 2024-11-16 at 5.58.39 PM.png
ItzJuan wrote on Reesle's profile.
Thanks for the follow, Reesle!
(1/2)
I was going through my old “suggestion archives” and found my old “Outer Space Bundle” suggestion that I had made before the Galaxy Bundle was ever announced.
IMG_6810.jpeg
Top Bottom