1.20.4 #84

Closed
ghost wants to merge 1 commits from main into main
pull from: main
ghost commented 2024-02-25 07:25:39 +00:00 (Migrated from github.com)

updated mcprotocollib to 1.20.4-2-SNAPSHOT
added net.kyori:adventure-text-serializer-gson:4.16.0
as dependency because when building without it it gave error because the version that mcprotcollib used was not available.

updated mcprotocollib to 1.20.4-2-SNAPSHOT added net.kyori:adventure-text-serializer-gson:4.16.0 as dependency because when building without it it gave error because the version that mcprotcollib used was not available.
M3RGeo commented 2024-03-01 14:39:09 +00:00 (Migrated from github.com)

have you been able to successfully compile it ?
Because I keep running into errors trying to compile this pr, it has to do with the java version.

this is what i get
****\mc-bots\src\main\java\me\creepermaxcz\mcbots\Bot.java:5: error: cannot access com.github.steveice10.mc.protocol.MinecraftConstants import com.github.steveice10.mc.protocol.MinecraftConstants; ^ bad class file: ****\.gradle\caches\modules-2\files-2.1\com.github.steveice10\mcprotocollib\1.20.4-2-SNAPSHOT\33b5a925f7a96447a2be9dad89f16b94ab6a4134\mcprotocollib-1.20.4-2-SNAPSHOT.jar(com/github/steveice10/mc/protocol/MinecraftConstants.class) class file has wrong version 61.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath.

it seems that mcprotocollib to 1.20.4-2-SNAPSHOT requires java 17 when the rest of this project uses java 8 to compile, I don't know how to set gradle to fix the issue, I think you have to change the following settings in build.gradle

from:
sourceCompatibility = 1.8
targetCompatibility = 1.8

To:
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

or just '17' at each, the last one worked for me after I found a issue with my java_Home path...
^^ This helps but it still won't compile

have you been able to successfully compile it ? Because I keep running into errors trying to compile this pr, it has to do with the java version. this is what i get `****\mc-bots\src\main\java\me\creepermaxcz\mcbots\Bot.java:5: error: cannot access com.github.steveice10.mc.protocol.MinecraftConstants import com.github.steveice10.mc.protocol.MinecraftConstants; ^ bad class file: ****\.gradle\caches\modules-2\files-2.1\com.github.steveice10\mcprotocollib\1.20.4-2-SNAPSHOT\33b5a925f7a96447a2be9dad89f16b94ab6a4134\mcprotocollib-1.20.4-2-SNAPSHOT.jar(com/github/steveice10/mc/protocol/MinecraftConstants.class) class file has wrong version 61.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath.` it seems that mcprotocollib to 1.20.4-2-SNAPSHOT requires java 17 when the rest of this project uses java 8 to compile, I don't know how to set gradle to fix the issue, I think you have to change the following settings in build.gradle from: sourceCompatibility = 1.8 targetCompatibility = 1.8 To: sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 or just '17' at each, the last one worked for me after I found a issue with my java_Home path... ^^ This helps but it still won't compile
crpmax commented 2024-03-02 09:51:02 +00:00 (Migrated from github.com)

Yes, it seems like Java 17 is required.
I have managed to compile it using gradle build, but when I run it with Java 8 it will not connect and
fail with
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/steveice10/packetlib/packet/PacketProtocol has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I will look into it and maybye upgrade it to Java 17 if there is no other solution.

Yes, it seems like Java 17 is required. I have managed to compile it using `gradle build`, but when I run it with Java 8 it will not connect and fail with `Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/steveice10/packetlib/packet/PacketProtocol has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0` I will look into it and maybye upgrade it to Java 17 if there is no other solution.
M3RGeo commented 2024-03-02 10:27:43 +00:00 (Migrated from github.com)

i was able to compile it yesterday and get it to run with no issue, but had to do both with java 17, java 8 doesn't want to work with it, the main reason I found for the major change with that is that the new mcprotocollib has a class that's written exclusively in java 17.

i was able to compile it yesterday and get it to run with no issue, but had to do both with java 17, java 8 doesn't want to work with it, the main reason I found for the major change with that is that the new mcprotocollib has a class that's written exclusively in java 17.
ghost commented 2024-03-02 13:15:10 +00:00 (Migrated from github.com)

yes like most modern minecraft related tools and libraries require java 17. Like maybe just use java 17. java 8 is too old at this point.

yes like most modern minecraft related tools and libraries require java 17. Like maybe just use java 17. java 8 is too old at this point.
IkdanYT commented 2024-03-06 14:52:40 +00:00 (Migrated from github.com)

pls add

pls add
polyzium commented 2024-05-20 13:07:00 +00:00 (Migrated from github.com)

+1 to this, Minecraft 1.20.4 requires Java 17 at this point, so it is most likely that the user will have Java 17 installed on their system. I have a 1.20.4 Paper server and I would like to test the plugin with this software.

+1 to this, Minecraft 1.20.4 requires Java 17 at this point, so it is most likely that the user will have Java 17 installed on their system. I have a 1.20.4 Paper server and I would like to test the plugin with this software.
polyzium commented 2024-05-20 13:22:31 +00:00 (Migrated from github.com)

After changing sourceCompatibility and targetCompatibility to 17, it does compile and run, but the bots time out before joining the game. whenever I try to send a chat msg I get this:
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Unregistered serverbound packet class: com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatCommandPacket

EDIT: Nevermind, my server has a custom resource pack, that's what caused the hanging on connection

After changing sourceCompatibility and targetCompatibility to 17, it does compile and run, ~~but the bots time out before joining the game. whenever I try to send a chat msg I get this: `io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Unregistered serverbound packet class: com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatCommandPacket`~~ EDIT: Nevermind, my server has a custom resource pack, that's what caused the hanging on connection

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.