Code Monkey home page Code Monkey logo

vanillacord's Introduction

VanillaCord

Build Status Release Verison

VanillaCord downloads and patches a vanilla Minecraft server, so proxies can connect to it with your choice of BungeeCord, BungeeGuard, or Velocity IP forwarding enabled.

java -jar VanillaCord.jar <versions...>

Downloads

For Minecraft 1.7.10, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, snapshots, and pre-releases

https://dev.me1312.net/jenkins/job/VanillaCord

vanillacord's People

Contributors

chrissamael avatar me1312 avatar thinkofname avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vanillacord's Issues

Doesn't allow offline mode proxies to forward to the server.

Gives:
19:53:02 [SEVERE] [mattbojh] <-> ServerConnector [lobby] - encountered exception java.lang.IllegalArgumentException: Unexpected packet received during server login process! 1bb9017b227472616e736c617465223a22646973636f6e6e6563742e67656e65726963526561736f6e222c2277697468223a5b22496e7465726e616c20457863
when connecting

21w19a Update needed cuz java 16?

What Happened

With the new update 21w19a it doesn't patch anymore likely due to the new java 16 requirement.

How It Happened

Cuz the new update (21w19a)

Additional Information

VanillaCord branch 1.12
Searching versions
Downloading Minecraft Server 21w19a
Loading
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at uk.co.thinkofdeath.vanillacord.Launch.main(Launch.java:52)
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.(ClassReader.java:170)
at org.objectweb.asm.ClassReader.(ClassReader.java:153)
at uk.co.thinkofdeath.vanillacord.Main.main(Main.java:66)
... 5 more

Crash with 21w39a+

Running java -jar VanillaCord.jar 21w39a results in a crash

$ java -jar VanillaCord.jar 21w39a
VanillaCord 1.7
Searching versions
Downloading Minecraft Server 21w39a
Loading
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at uk.co.thinkofdeath.vanillacord.Launch.main(Launch.java:55)
Caused by: java.lang.NullPointerException: Cannot read the array length because "classFile" is null
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
        at uk.co.thinkofdeath.vanillacord.Main.main(Main.java:99)
        ... 5 more

Perhaps, but the MinecraftServer mechanism has changed significantly since 21w39a.
If you start 21w39a as is, you will see the following directory structure.


root/
    ┠ libraries/
    ┃┗ mojang
    ┃    ┗ authlib
    ┃        ┗ 3.1.36
    ┃            ┗ authlib-3.1.36.jar
    ┃        etc...
    ┃   etc...
    ┠ versions
    ┃ ┗ 21w39a
    ┃   ┗ server-21w39a.jar
    ┠ logs/
    ┠ 21w39a.jar
    ┠ eula.txt
    ┗ server.properties

Crash when trying to compilate 1.14.2 server

What Happened

root@5350:/home/twix/vanillacord# java -jar VanillaCord.jar 1.14.2
VanillaCord launcher v1.6
Searching versions
Reusing patches from branch 1.12
Loading
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.ME1312.VanillaCordLauncher.Launch.main(Launch.java:90)
Caused by: java.lang.NullPointerException
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at uk.co.thinkofdeath.vanillacord.Main.main(Main.java:90)
        ... 5 more

1.14.0 and 1.14.1 build as intended but not way to build 1.14.2.
Is Mojang guilty in this issue?

Timeout on join after update to 1.20.5

What Happened

Not sure whether bug or not:
I'm hosting two minecraft vanilla servers (raspi pi5) behind velocity proxy (pi4b) for my kids. On 1.20.4 with whitelists in place everything went well and smoothly.
After updating both servers to 1.20.5 I am unable to connect. I am stuck on "joining world" until a timeout happens, regardless if I'm whitelisted or whitelist is disabled at all.

What I did:

  • I updated Velocity with Geyser and Floodgate plugin by downloading latest jars
  • On both servers I downloaded latest vanillacord.jar and generated the new 1.20.5.jar
  • I moved the 1.20.5.jar to [MinecraftFolder]/serverVanillaCord.jar
  • neither existing VanillaCord.txt nor any other configuration has been manually changed

Velocity console:

[02:04:33 INFO]: [connected player] [Player Name] (/[IP]:[Port]) has connected
[02:04:33 INFO]: [server connection] [Player Name] -> [MC-Server] has connected
[02:05:03 INFO]: [connected player] [Player Name] (/[IP]:[Port]) has disconnected
[02:05:03 INFO]: [server connection] [Player Name] -> [MC-Server] has disconnected

MC server console:

[02:05:03] [Server thread/INFO]: com.mojang.authlib.GameProfile@[Profile Guid],name=[Player Name],properties={textures=[Property[name=textures, value=[some key], signature=[some other key]] lost connection: Disconnected

Any advice would behighly appreciated.

Cheers,
Michael

Update

Current velocity settings work flawlessly with minecraft server 1.20.4 vanila Cord.

sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError

Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
at net.minecraft.server.Main.(SourceFile:60)

My Version:1.17.1

sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError

Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
at net.minecraft.server.Main.(SourceFile:60)

My Version:1.17.1

Connection fails for a 1.19 server

Expected Behaviour

I should be able to log into a 1.19 server served by the jar generated by VanillaCord through the latest BungeeCord (build 1644)

Actual Behaviour

The VanillaCord server logs no errors.
Client and BungeeCord server fails the connection with logs:

00:35:26 [INFO] [<User>] disconnected with: Kicked whilst connecting to <server_name>: Internal Exception: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    agj.a(Lzf;)V @131: putfield
  Reason:
    Type 'agj' (current frame, stack[1]) is not assignable to 'com/mojang/authlib/GameProfile'
  Current Frame:
    bci: @131
    flags: { }
    locals: { 'agj', 'zf', 'com/mojang/authlib/GameProfile' }
    stack: { 'com/mojang/authlib/GameProfile', 'agj' }
  Bytecode:
    0000000: 2ab4 004a b200 48a6 0007 04a7 0004 0313
    0000010: 0139 03bd 0004 b801 3f2b b601 41b8 0144
    0000020: 1301 4603 bd00 04b8 013f 2a2b 2ab4 004e
    0000030: b601 4a2a b400 4eb6 014d b801 4fb5 00e7
    0000040: a700 274d b200 922c b601 522c b601 56b9
    0000050: 00b1 0300 2ab4 0050 b600 c69a 000c 2a2c
    0000060: b601 59b6 008d b12a b400 4eb6 015d 4d2c
    0000070: c600 1a2b b601 412c b601 60b6 0163 9900
    0000080: 0c2c 2ab5 0071 b500 4ab1 2abb 0073 5901
    0000090: 2b03 b701 66b5 0071 2ab4 004e b601 6999
    00000a0: 003a 2ab4 0050 b600 c69a 0030 2ab2 016b
    00000b0: b500 4a2a b400 50bb 016d 5912 3d2a b400
    00000c0: 4eb6 0171 b601 77b9 017d 0100 2ab4 005f
    00000d0: b701 80b6 00a9 a700 0a2a b200 65b5 004a
    00000e0: b1                                     
  Exception Handler Table:
    bci [42, 64] => handler: 67
  Stackmap Table:
    same_frame(@14)
    same_locals_1_stack_item_frame(@15,Integer)
    same_locals_1_stack_item_frame(@67,Object[#9])
    same_frame(@103)
    append_frame(@138,Object[#115])
    same_locals_1_stack_item_extended(@217,Object[#2])
    same_locals_1_stack_item_frame(@224,Object[#2])

00:35:26 [INFO] [<User>] -> UpstreamBridge has disconnected
00:35:26 [INFO] [<User>] <-> ServerConnector [<server_name>] has disconnected

Additional Testing Notes

  • I spun up a 1.19 Spigot server instead, for which I am able to connect to without issue, for the same configuration
  • I am able to connect to my old 1.18.1 VanillaCord server using the same configuration
  • BungeeCord is running with ip_forward: true

I have this problem when I want to open my hub server, it opens the bungee cord but I don't let the hub open, this error appears and it restarts

Starting server...
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Loading libraries, please wait...
java.lang.ExceptionInInitializerError
at org.bukkit.craftbukkit.Main.main(Main.java:187)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
at net.minecraft.server.v1_8_R3.MinecraftServer.(Unknown Source)
... 1 more

multiplayer.disconnect.incompatible

Hello again!
I've setup my bungeecord with the latest avaialble build, plus the latest available viaversion build (I know I shouldnt need it, but the protocol doesnt seem to be natively supported by bungeecord). I'm getting the error multiplayer.disconnect.incompatible upon connecting. I'm not sure if this is caused by bungeecord or vanillacord :).

I can't see any messages on my vanillacord server upon connecting, but on my bungeecord server I get:

[19:33:32 INFO]: [/xxx:55056] <-> InitialHandler has connected
[19:33:33 INFO]: [quiquelhappy|/xxx:55056] <-> ServerConnector [simply] has connected
[19:33:33 INFO]: [quiquelhappy] disconnected with: Kicked whilst connecting to simply: multiplayer.disconnect.incompatible
[19:33:33 WARN]: [quiquelhappy|/xxx:55056] <-> ServerConnector [simply] - NativeIoException: readAddress(..) failed: Connection reset by peer
[19:33:33 INFO]: [/xxx:55056|quiquelhappy] -> UpstreamBridge has disconnected
[19:33:33 INFO]: [quiquelhappy|/xxx:55056] <-> ServerConnector [simply] has disconnected

and on the client I see
image

Im sorry to bug you if this is a bungeecord-related issue, just wanted to make sure Im setting up everything correctly. ip forwarding is enabled on my bungeecord server, my bungeecord server and subservers are set with online-mode = true.

Issue with 21w37a snapshot on waterfall

I have attempted to build and run a snapshot as a test (latest 21w37a). I see in your notes you say added support for velocity ip-forwarding. Does this mean this now only supports velocity? I hooked mine to bungee and waterfall to run some tests and it shows nothing in the log on the snapshot server when attempting the connection.

args:<version>

hi

When starting server 1.15 with this startup parameter: java -Xms128M -Xmx1024M -jar VanillaCord.jar, I get an error that causes the server to crash, it is as follows: / home / container $ java -Xms128M -Xmx1024M -jar VanillaCord .jar
Args: , I would like to know how to fix it.

[1.8] 1.18.2 Patching of ServerLoginPacketListenerImpl.handleHello() alters wrong instruction - java.lang.VerifyError: Bad type on operand stack

When attempting to connect via a BungeeCord proxy, the following kick message is returned:

disconnected with: Kicked whilst connecting to lobby: Internal Exception: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
aeq.a(Lxp;)V @33: invokestatic
Reason:
Type integer (current frame, stack[0]) is not assignable to 'java/lang/String'
Current Frame:
bci: @33
flags: { }
locals: { 'aeq', 'xp' }
stack: { integer }

There is more, but this was sufficient to track down the cause. In 1.18.2, an extra validation call is made to make sure no invalid characters are in the player's username.

1.18.1

    public void a(xd $$0) {
        Validate.validState((this.h == aec$a.a ? 1 : 0) != 0, (String)"Unexpected hello packet", (Object[])new Object[0]);
        this.j = $$0.b();
        if (this.g.U() && !this.a.d()) {
            this.h = aec$a.b;
            this.a.a((qr)new wy("", this.g.L().getPublic().getEncoded(), this.f));
        } else {
            this.h = aec$a.e;
        }
    }

1.18.2

    public void a(final xp $$0) {
        Validate.validState(this.h == aeq.a.a, "Unexpected hello packet", new Object[0]);
        this.j = $$0.b();
        Validate.validState(a(this.j.getName()), "Invalid characters in username", new Object[0]);
        if (this.g.U() && !this.a.d()) {
            this.h = aeq.a.b;
            this.a.a((rc)new xk("", this.g.L().getPublic().getEncoded(), this.f));
        }
        else {
            this.h = aeq.a.e;
        }
    }

I suspect that the patcher is finding the second Validate and making changes to it.

sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError

Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
at net.minecraft.server.Main.(SourceFile:60)

My Version:1.17.1

Type Signature of Targeted Method in LoginListener has changed in 1.20.2

Using VanillaCord build 22w24b

VanillaCord 1.8
Searching versions
Downloading Minecraft Server 1.20.2
Running the self-extracting server bundle
Loading server bytecode
Found the handshake listener in alq.class
Found the login listener in alr.class
Patching classes
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at uk.co.thinkofdeath.vanillacord.packager.BEv1.edit(BEv1.java:97)
        at uk.co.thinkofdeath.vanillacord.packager.BundleEditor.main(BundleEditor.java:59)
        at net.minecraft.bundler.Main.lambda$run$0(Main.java:54)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalStateException: Inject failed
        at uk.co.thinkofdeath.vanillacord.patcher.LoginListener$1.visitEnd(LoginListener.java:143)
        at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1518)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:744)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:424)
        at uk.co.thinkofdeath.vanillacord.patcher.Patcher.patch(Patcher.java:146)
        ... 8 more

In 1.20.2 the method now accepts a String instead of a GameProfile.

1.20.1

    protected GameProfile a(final GameProfile $$0) {
        final UUID $$ = hy.a($$0.getName());
        return new GameProfile($$, $$0.getName());
    }

1.20.2

    protected static GameProfile b(final String $$0) {
        final UUID $$ = hx.a($$0);
        return new GameProfile($$, $$0);
    }

Provide a license for the repository

What Should Be Added

Hi there! Currently this repository has no clear license, and without that GitHub's terms of service state we legally cannot modify the code of this repository in any way, even locally or in a fork: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository#choosing-the-right-license

Why It Should be Added

For context, I'm interested in tinkering with this in a private GitHub organisation, though the repo would remain private and not be distributed. Other people may like to know the clear terms of how, if at all, we may use this code. Would you consider adding a license to let us know whether this is possible?

What's The Alternative

No clear license means we do not have the rights to do more than look at the code :)

Crash with 1.16.4+

Running java -jar VanillaCord.jar 1.16.4 (or the latest snapshot, 20w45a) results in a crash

VanillaCord launcher v1.6
Searching versions
Reusing patches from branch 1.12
Loading
Found the login listener in aba.class
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.ME1312.VanillaCordLauncher.Launch.main(Launch.java:90)
Caused by: java.lang.NullPointerException
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at uk.co.thinkofdeath.vanillacord.Main.main(Main.java:90)
        ... 5 more

This does not happen with 1.16.3 or other previous versions.

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.