Skip to content

masterpatrickpl-coder/bedwarsantilagmod

Repository files navigation

Bedwars AntiLag Mod

Important

This mod is still in development, and I'm genuinely not sure if it even works as intended.

Compensates for network latency in fast-paced scenarios like Bedwars by extrapolating entity positions based on ping.

Features

  • Positional Extrapolation: Predicts where a player is moving based on their ping to the server, compensating for the visual delay inherent in multiplayer games.
  • Hitbox Synchronization: Automatically applies the extrapolation during client-side combat raytracing. This means your crosshair interacts flawlessly with the visual model, even though the server thinks they are further behind.
  • Rotation Extrapolation: Also predicts head and body rotations (Pitch & Yaw) so you can tell where high-latency players are aiming.
  • Smoothed Velocity: Uses a moving average over a configurable history to calculate velocity, eliminating jitter compared to 1-tick velocity vectors.
  • Teleport & Knockback Detection: Pauses extrapolation if an entity is moved an impossible distance instantly, preventing rubber-banding during events like ender pearl teleports.
  • Interpolation Tuning: Reduces vanilla interpolation steps for extrapolated entities to provide more immediate visual feedback.
  • In-Game Commands: Use /bedwarsantilag to tweak your configuration.

Configuration (bedwarsantilag.json)

The mod will generate a config file in your config directory on the first run.

  • extrapolationEnabled: (Default: true) Toggles the core logic.
  • pingOffsetMs: (Default: 200) The assumed ping fallback if the server doesn't provide it via player info.
  • maxExtrapolationDistance: (Default: 4.0) The absolute maximum distance (in blocks) the mod will visually displace a player.
  • historyTicks: (Default: 5) Number of ticks to keep in the rolling average for velocity smoothing.
  • disableOnTeleport: (Default: true) Prevents extreme snap-backs on sudden, large movements.
  • targetInterpolationSteps: (Default: 2) The number of ticks vanilla Minecraft uses to blend entity movement (default is 3).

Building

gradle clean build
.\gradlew.bat clean build
chmod +x gradlew.sh
./gradlew.sh clean build

Requirements

  • Java 25
  • Fabric Loader >= 0.18.4
  • Fabric API
  • Minecraft 26.1.2

About

Another stupid mod

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages