ImmersiveMC

ImmersiveMC

2M Downloads

A Bit of Anticheat

hammy275 opened this issue ยท 0 comments

commented

Right now, we only continue with handling a SwapPacket if the position our client tells us is loaded https://github.com/hammy3502/immersive-mc/blob/master/src/main/java/net/blf02/immersivemc/common/network/packet/SwapPacket.java#L41 . However, someone could use this to gleam the positions of loaded chunks.

To counter this, we should instead check that both the position is loaded, and that the distanceToSqr() between the player and its position is at most 256 (aka the distance between the player and it is 16 blocks). This way, it's practically impossible to gleam unknown information to a potential hacker.