Extended Reach - I got the code working, but not as a plugin

Discussion in 'Archived: Plugin Requests' started by DeLux, May 9, 2011.

  1. Offline

    DeLux

    Would be nice if someone could make this into a Bukkit plugin so the stupid manual editing wasn't needed. I don't know how to make plugins though. If you do this, be nice and give me some credit at least.

    Working Extended Reach for online play (Bukkit servers only, and it's not trivial).

    For you as a user it's easy:

    ------ For end users/players:

    http://www.toadwater.com/MC/wa.class

    Download, put it in your Minecraft the same way all those client mods work. This is the exact same change as the nu.class from the original post, only that it's for online play, and that it's a limit of 64, and if you don't like it, you can suck it and figure out yourself how to make it whatever you want.

    Now you have extended reach in online play. HOWEVER, even though it will appear to work, unless you play on a server with the following mod enabled, the blocks will revert back after a few seconds and it will be useless. You have to ask your server admin to do the following:

    ------ For server admins:

    Ok, this isn't pretty. I don't know how to make Bukkit plugins, and I'm pretty sure this isn't even something a Bukkit plugin can do. I have uploaded the modified class (for CraftBukkit 740) here:

    http://www.toadwater.com/MC/NetServerHandler.class

    Goes in the CraftBukkit jar into the folder net/minecraft/server

    THIS IS EXTREMELY DISCOURAGED! THE BUKKIT DEVS OFFICIALLY FROWN UPON THIS! I HAVEN'T EVEN TRIED THIS! THIS MIGHT INTRODUCE STRANGE AND GAME BREAKING BUGS! DO NOT COMPLAIN TO THE BUKKIT DEVS! DO NOT COMPLAIN TO ANYONE! LEARN HOW TO DO IT THE RIGHT WAY!


    The proper way is to download and compile CraftBukkit as per https://github.com/Bukkit/CraftBukkit yourself (it's not hard. Really.) and then find and edit NetServerHandler.java yourself.

    You need to change line 26 from

    Code:
    private static final int PLACE_DISTANCE_SQUARED = 6 * 6; // CraftBukkit here for now
    
    to

    Code:
    private static final int PLACE_DISTANCE_SQUARED = 64 * 64; // CraftBukkit here for now
    or however far you want to allow building, and line 415 from

    Code:
    if (d3 > 36.0D) {
    to

    Code:
    if (d3 > 12288.0D) {
    or however far you want to allow destroying - the number there is distance * distance * 3, so the original 36 ~ 3.5 * 3.5 * 3.

    Then recompile and tadaa.
     
  2. Offline

    EduardoTA

Share This Page