• 0

    posted a message on [Outdated] Advanced modding
    Alright, I gave up trying to edit MinecraftServer.java. It's just not going to compile and I cannot for the life of me figure out why.

    Other classes compile fine. The way I'm doing things is a little different than blitz but those directions are basically the same. If anyone has managed to edit and recompile MinecraftServer.java and lived to tell the tale, would you care to share?
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Quote from fotoply »
    @donkey kong
    I tried to do that with TerrainMod, but it would give me some errors unless i passed the WHOLE path to the minecraft_server.jar...
    But it's just me i guess...


    The jar was in working directory but let me give this a shot. Nah, same error.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Quote from xau »
    Quote from Donkey Kong »

    MinecraftServer.java:3: '.' expected
    /* */ import ai;
    ^
    [/code]

    This is ridiculous. Not you guys who are helping! I appreciate every bit of that. But this whole... situation.

    Delete the packageless import statements.


    Well, then they don't get imported at all, which causes a billion other "cannot find symbol" errors.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Quote from fotoply »
    Try compiling using javaC(The commandline interface)...

    Do like this:
    cd C:\Program Files\Java\jdk1.6.0_21\bin
    JavaC <Mod location>\<Mod name>.java -cp <Minecraft server.jar location>\minecraft_server.jar


    I did this a few posts back with no luck. Here I try it again but with your exact command:
    javac MinecraftServer.java -cp minecraft_server.jar
    MinecraftServer.java:3: '.' expected
    /*     */ import ai;
                       ^
    MinecraftServer.java:3: ';' expected
    /*     */ import ai;
                        ^
    MinecraftServer.java:4: class, interface, or enum expected
    /*     */ import aw;
                     ^
    MinecraftServer.java:5: '.' expected
    /*     */ import ba;
                       ^
    MinecraftServer.java:5: ';' expected
    /*     */ import ba;
                        ^
    MinecraftServer.java:6: class, interface, or enum expected
    /*     */ import bm;
                     ^
    MinecraftServer.java:7: '.' expected
    /*     */ import bn;
                       ^
    MinecraftServer.java:7: ';' expected
    /*     */ import bn;
                        ^
    MinecraftServer.java:8: class, interface, or enum expected
    /*     */ import bp;
                     ^
    MinecraftServer.java:9: '.' expected
    /*     */ import cq;
                       ^
    MinecraftServer.java:9: ';' expected
    /*     */ import cq;
                        ^
    MinecraftServer.java:10: class, interface, or enum expected
    /*     */ import dc;
                     ^
    MinecraftServer.java:11: '.' expected
    /*     */ import dg;
                       ^
    MinecraftServer.java:11: ';' expected
    /*     */ import dg;
                        ^
    MinecraftServer.java:12: class, interface, or enum expected
    /*     */ import dw;
                     ^
    MinecraftServer.java:13: '.' expected
    /*     */ import ea;
                       ^
    MinecraftServer.java:13: ';' expected
    /*     */ import ea;
                        ^
    MinecraftServer.java:14: class, interface, or enum expected
    /*     */ import eb;
                     ^
    MinecraftServer.java:15: '.' expected
    /*     */ import ee;
                       ^
    MinecraftServer.java:15: ';' expected
    /*     */ import ee;
                        ^
    MinecraftServer.java:16: class, interface, or enum expected
    /*     */ import ef;
                     ^
    MinecraftServer.java:17: '.' expected
    /*     */ import fk;
                       ^
    MinecraftServer.java:17: ';' expected
    /*     */ import fk;
                        ^
    MinecraftServer.java:18: class, interface, or enum expected
    /*     */ import fl;
                     ^
    MinecraftServer.java:19: '.' expected
    /*     */ import fo;
                       ^
    MinecraftServer.java:19: ';' expected
    /*     */ import fo;
                        ^
    MinecraftServer.java:20: class, interface, or enum expected
    /*     */ import ft;
                     ^
    MinecraftServer.java:21: '.' expected
    /*     */ import fw;
                       ^
    MinecraftServer.java:21: ';' expected
    /*     */ import fw;
                        ^
    MinecraftServer.java:22: class, interface, or enum expected
    /*     */ import gp;
                     ^
    MinecraftServer.java:23: '.' expected
    /*     */ import id;
                       ^
    MinecraftServer.java:23: ';' expected
    /*     */ import id;
                        ^
    MinecraftServer.java:24: class, interface, or enum expected
    /*     */ import ij;
                     ^
    33 errors


    This is ridiculous. Not you guys who are helping! I appreciate every bit of that. But this whole... situation.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    I still can't seem to get that far. I mean, I tried doing exactly what you said, but it didn't change whatever is holding me up. I added minecraft_server.jar to the class path, and it appears under referenced libraries, but no matter what I do, Eclipse says "The import ai cannot be resolved", referring to the first line of minecraft_server.java. Then hundreds of errors, one for each import and another each time something that would have been defined in that import is used.

    I feel like I'm missing something super obvious. The import statement is not searching the default package (or I guess, unpackaged) classes in the jar. From what I know about Java, it's not supposed to search there. But clearly you've gotten it to do something that has worked.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Presumably if you take the one class and compile it with the original jar in the class path, it should be able to link against the standard classes. So that would be how you only compile however many files you modified. I just don't know how to do this.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Hey SongeBob, would you mind elaborating briefly on the recompilation step? I can't seem to get it to work.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Ok, this just isn't working for me. I've tried eclipse and netbeans, tried getting "minecraft_server.jar" into the classpath and nothing seems to work. I even tried compiling from the command line:

    javac -cp '.:minecraft_server.jar' MinecraftServer.java
    MinecraftServer.java:3: '.' expected
    /*     */ import ai;
                       ^
    MinecraftServer.java:3: ';' expected
    /*     */ import ai;
                        ^
    MinecraftServer.java:4: class, interface, or enum expected
    /*     */ import aw;
                     ^
    MinecraftServer.java:5: '.' expected
    /*     */ import ba;
                       ^
    MinecraftServer.java:5: ';' expected
    /*     */ import ba;
                        ^


    And on and on for 33+ errors. It's like it's ignoring my -cp flag altogether, both in the IDEs and on the command line. What super obvious thing am I missing?!
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    I'm also looking for some help with creating some mods. I'm a proficient coder and I like to think that I won't need my hand held.

    I'm interested as a first little project to alter the SMP server to allow getting and setting of player coordinates by OPs and the console. So I got a fresh copy and JD-GUI and decompiled. Opened up MinecraftServer.java and found the tp command. Based on what I gathered from that, I guessed getting and setting the coordinates with a command would look something like this:

    // Getting coordinates
    
    } else if (str1.toLowerCase().startsWith("getcoords ")) {
        localObject1 = str1.split(" ");
        if (localObject1.length == 2) {
            localObject2 = this.f.h(localObject1[1]);
            if (localObject2 == null) {
                localef.b("Can't find user " + localObject1[1] + ". No coords.");
            } else {
                a(str2, "Coords: " + localObject2.l + " , " + localObject2.m + " , " + localObject2.n + " , " + localObject2.r + " , " + localObject2.s);
            }
        } else {
            localef.b("Syntax error, please provide a source.");
        }
    
    
    // Setting coordinates
    
    } else if (str1.toLowerCase().startsWith("setcoords ")) {
        localObject1 = str1.split(" ");
        if (localObject1.length == 7) {
            localObject2 = this.f.h(localObject1[1]);
            if (localObject2 == null) {
                localef.b("Can't find user " + localObject1[1] + ". No tp.");
            } else {
                try {
                ((ea)localObject2).a.a(Double(localObject1[2]),Double(localObject1[3]),Double(localObject1[4]),Double(localObject1[5]),Double(localObject1[6]));
                a(str2, "Teleporting " + localObject1[1] + " to location...");
                }
                catch (NumberFormatException e)
                {
                    localef.b("Syntax error, bad coords.");
                }
            }
        } else {
            localef.b("Syntax error, please provide a source and 5 coords.");
        }


    So now I'm working on recompiling this and getting it back into the JAR. I tried using eclipse and adding the server jar to the project's path but I had no luck getting the compiler to recognize the classes from the jar and link against them.

    Trying Netbeans now, because I really never liked eclipse.
    Posted in: Tutorials
  • To post a comment, please .