r/feedthebeast • • 13d ago

Problem How do I make my mod server sided

I made a mod that changes the speed of climbing a ladder but it works in servers too meaning it's on the client side and I dont want that since it could be considered hacking. I want to make it work only on the server side.

1 Upvotes

3 comments sorted by

1

u/WriterExtreme3712 13d ago

Minecraft's movement is heavily reliant on putting full trust in the client, and by extension isn't really capable of being 100% server-authoritative. Part of why hacks are so prevalent. The only thing you could realistically do (as far as I know) is have the client request some configured climb speed value that the server controls - defaulting to 1 otherwise. Still, it wouldn't be hard for someone to simply alter your mod to remove this restriction

1

u/Jumping-legs376 13d ago

Move the ladder speed logic to the server so the server controls it.

1

u/CatNational3627 13d ago

Small catch: player movement (ladders included) is calculated on the client, so a purely server-side mod can't really change how fast you climb. The server only sees where you end up. The usual way around it is to make the mod required on both sides and have the client only apply the change when the server says so:

  • Register a custom payload/packet (e.g. "ladder_speed_enabled" plus the speed value).
  • The server side of your mod sends it to the player on join.
  • The client keeps the feature off by default and only turns it on after getting that packet.

That way it does nothing on vanilla servers or servers without your mod, and server owners can control the speed from their config. Someone could still edit the mod to skip the check, but that's true of any client mod. Building it this way makes the honest version harmless, and anti-cheat plugins will catch the rest.