Coder Social home page Coder Social logo

fluffysnaff / liveoverflowmod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jorianwoltjer/liveoverflowmod

0.0 0.0 0.0 170 KB

A Minecraft hacked-client for the LiveOverflow Server. Contains various hacks for the challenges on the server, and some utilities.

License: MIT License

Java 99.82% Batchfile 0.18%

liveoverflowmod's Introduction

LiveOverflowMod

A Minecraft hacked-client for the LiveOverflow Server. Contains various hacks for the challenges on the server, and some utilities.

Read all about it in my blog post, and now also Part 2!

Hacks

Screenshot of the Text UI in the bottom right corner

WorldGuard Bypass ;

WorldGuard was used to deny "entry" to a protected area, in which the player had to die in the lava to complete the challenge. WorldGuard works using PlayerMoveEvents and this bypass works by moving without triggering this event.

Only when movement is large enough, an event is sent. So we can move a small amount, and then save the position by "moving too quickly!". This means it can only move 0.06 blocks per tick, and then has to send a position packet far away to trigger the warning and reset your position for the next repeat. However, this can be improved because WorldGuard only checks regions when you cross a block boundary. So when we can move almost a full block while not crossing the boundary, and then only move a small amount to cross the boundary.

When this hack is activated using the default ; (semicolon) keybind, it will allow you to move in this way with your WASD keys.

YouTube Video - Showcase

  • WorldGuardBypass.java: When activated, it performs the bypass explained above until it is deactivated again
  • LivingEntityMixin.java: Redirect the isImmobile() method to return true when the hack is enabled, so the normal player movement is disabled

Reach ]

While reading the movement code, I found that it is possible to send a position packet a maximum of 10 blocks away from the current position. But also that you can send 5 packets per tick, so you can move 50 blocks in a single tick. This gave me the idea of making a reach hack that uses this by sending multiple position packets going towards a player, hit them, and then move back. That is exactly what this hack does when you toggle the default ] (right bracket) keybind, and then click on a far away entity as if you were hitting them.

Warning: This hack is not perfect. It only works when there is a clear line of sight to the player, and sometimes gets stuck while moving meaning you end up somewhere along traveled path. But it's good enough for a proof of concept!
See Clip Reach for a better version of this hack that teleports through blocks.

YouTube Video - Showcase

  • Reach.java: When enabled, you will teleport to every entity you click from a distance, and then teleported back to your original position
  • ClientPlayerInteractionManagerMixin.java: Detect clicking on entities and forward it to the teleport function
  • MinecraftClientMixin.java: When enabled, the client will think it can hit entities from far away to make the Minecraft UI work correctly and detect hit attempts

Clip Reach [

There is a trick to clip huge distances by sending many movement packets in a single tick, and then doing one big jump. This is implemented into the Clip Reach hack which when enabled using the default [ (left bracket) keybind, will use this to teleport upwards, then above the target, and finally down to the target. Afterward it goes back up, to your original position, and back down. This all happens without seeing any teleports on screen, for a clean Reach feeling.

Warning: Due to the required number of packets needed to be sent in a single tick, it may fail sometimes and get you stuck somewhere in the middle, often in the air. Because of this it is recommended to use a NoFall hack when trying to use this hack so you don't die :)

YouTube Video - Showcase

  • ClipReach.java: When enabled, you will teleport to every entity you click from a distance, through walls, and then teleported back to your original position
  • ClientPlayerInteractionManagerMixin.java: Detect clicking on entities and forward it to the teleport function
  • MinecraftClientMixin.java: When enabled, the client will think it can hit entities from far away to make the Minecraft UI work correctly and detect hit attempts

Panic Mode ,

When you want to AFK, you can enable this mode with the , (comma) keybind to make sure nothing happens to you. It detects players entering your render distance, and receiving any form of damage. When it detects any of these, it sends 5 packets per tick each moving you up 10 blocks. It does so 1 full second meaning you end up traveling precisely 1000 blocks straight up. Afterward it instantly disconnects you from the server.

Passive Mods -

Passive Mods are enabled by default, and are expected to always be used. They are utility mods that don't really have a downside.

You can toggle all passive mods at once using the default - (minus) keybind.

Anti-Human Bypass

All movement packets need to be rounded to the 100ths. This is done using a simple Math.round() function, and to fix floating point errors the Math.nextAfter() function is used.

Disable Weird Packets

There are a few packets that the server tries to send to you that are actually fake, namely World Border, Creative Mode, Demo Mode and End Credits. These packets are not actually enforced by the server, only to mess with your client. This mod ignores them.

Warning: The mod does not differentiate between the server sending a fake gamemode change, or you actually changing gamemode. Therefore, if you want to change gamemode, you need to disable this mod first.

Insta-Mine

This hack is a simple one useful in some situations. When you try to break a block, it will send START_DESTROY_BLOCK action to the server. When you as the client are done breaking the block, it will send STOP_DESTROY_BLOCK to the server, and it will verify if you have been breaking the block for long enough. It turns out that the server only checks if you have broken the block 70% of the way, so you can send STOP_DESTROY_BLOCK a bit faster than normal. (see ServerPlayerGameMode.java in the Paper-Server source code)

public void handleBlockBreakAction(BlockPos pos, ServerboundPlayerActionPacket.Action action, Direction direction, int worldHeight, int sequence) {
    ...
    float f1 = iblockdata.getDestroyProgress(this.player, this.player.level,pos) * (float) (l+1);

    if(f1 >= 0.7F) {  // <--- This check is abused
        this.isDestroyingBlock = false;
        this.level.destroyBlockProgress(this.player.getId(), pos, -1);
        this.destroyAndAck(pos, sequence, "destroyed");  // Count as destroyed
        return;
    }
    ...
}

This allows you to insta-mine some blocks, that were previously really close to being insta-minable. You can for example insta-mine stone and cobblestone with an Efficiency 5 Netherite Pickaxe using this hack.

Random Texture Rotations

This hack changed the random texture rotation code to use a completely random number every time, so it is not reversible from a screenshot. This was to be able to take screenshots and videos, while not revealing the texture rotations that can be brute-forced easily for coordinates. The same type of mod was used by LiveOverflow himself to make the challenge of finding his base harder.

Commands

Clipping

A lot can be done with the ability to clip through walls. There are a few commands that do useful things like flipping vertically and horizontally. There are 4 common-use commands, and 2 specific ones for challenges:

  • /vclip: Vertical clip, through ceilings and floors, up to around 180 blocks (always straight up)

  • /hclip: Horizontal clip, through walls by teleporting up, forward and then down. Up to around 150 blocks (always flat)

  • /dclip: Directional clip, into the exact direction you are looking. Up to around 150 blocks

  • /autoclip [up|down]: Automatically clip through the nearest floor or ceiling, placing you at the first open air gap the player fits

  • /vault: Complete the Vault challenge by clipping through the 50 blocks of bedrock. Start from the button and it will automatically start the challenge, teleport and finish the challenge giving you a mask

  • /clubmate: This trick also works on the original Club Mate challenge, it will simply teleport to the chest and open it in one tick

  • ClipCommand.java: Includes all the logic for clipping through walls, as well as the registered commands

Bedrock Cracking

I made a few commands to aid in cracking the bedrock formation in order to find LiveOverflow's base: *

  • /bedrock: Simply tell if a certain coordinate should be bedrock or not (in The Nether). It calculates this itself, not by looking at the block data in chunks. This command was useful because you can set a breakpoint in the code to see exactly what the algorithm is doing, while comparing it to your own code.

  • /getcode [from] [to]: Select an area from two coordinates, and get the Rust code of the offsets from a recreation of bedrock copied to your clipboard. Simply recreate some formation with bedrock and glass, and run the command over the area to get the code. It is meant to be used with my BedrockFinder tool, which will then find the coordinates of that bedrock formation in a specific seed.

  • GetCodeCommand.java: /getcode command and /bedrock command implementations

Development

Building to JAR (IntelliJ)

  1. Select liveoverflowmod build task and click green arrow in
  2. JAR in build/libs

Building and running Minecraft (IntelliJ)

  1. Select Minecraft Client task and click green arrow
  2. Minecraft will start, with logs in IntelliJ

Note: Use the ViaFabric mod to connect to any lower version server

Resources

liveoverflowmod's People

Contributors

jorianwoltjer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.