Skip to content

Instantly share code, notes, and snippets.

View Beaness's full-sized avatar

Beanes Beaness

View GitHub Profile
@Beaness
Beaness / pingpong.md
Last active March 18, 2026 21:10
Minecraft anticheat ping pong system

🏓 The Ping-Pong System

Minecraft uses TCP for connections. TCP ensures reliable, ordered delivery of data. This means if the server sends
A -> B -> C the client will receive it in that exact order.

🚨 The Problem

For anticheats to work properly, we need to know what "state" the client is in.
This is not as easy to detect because latency comes into play. For example, if we send Give Player Jump Boost to the player, it takes some time before the client actually receives it.

@Beaness
Beaness / lunar.js
Created July 10, 2021 13:04
Lunar Client protodef scheme
const scheme = [
"container",
[
{
name: "id",
type: [
"mapper",
{
type: "varint",
mappings: {
NORMAL OBJECT:
Collection [Map] {
'cwUyGj2' => Invite {
guild:
Guild {
members: [GuildMemberManager],
channels: [GuildChannelManager],
roles: [RoleManager],
presences: [PresenceManager],
voiceStates: [VoiceStateManager],