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

Team online

Latest profile posts

Casualpoalrbear wrote on Xi1m's profile.
FkhsjevXEBQvIe3.jpg
to the very few 5 or less people who are concerned about fhg dont worry its not going anywhere i just dont feel like writing at all and im disappointed in myself so

dw its not that deep
Desiderata wrote on caraMel's profile.
cara mel you are my biggest hater ily
1714232286010.png
Desiderata wrote on Centuria's profile.
congrats on being able to drive a car

should've said it here instead of posting it on the fhg topic :(
will you guys still love me if chapter 4 turns out to be shorter and more underwhelming
Top Bottom