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

Mintypie231 wrote on Floraljackp14's profile.
Hello and welcome to the forums! If you need any help feel free to message me or a staff member! :D
IM GOING TO AMERICA TOMORROW!!!
:3
1000171743.jpg

Anyway I would be less online in the forums and on minecraft due to exams. Now you might be asking, "Didn't it happen like a while ago?" Yes, but the school has to make me suffer by doing it every 2-3 months, so don't mind if I casually leave for like 2 weeks. Just need to suffer till end of may :D
Daily Question 111. ⭐

What do you think the world will be like in the future?
Livvv wrote on sebasxd12's profile.
Thanks for the follow! ^-^
Top Bottom