Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Minecraft 1.20 #71

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Added support for Minecraft 1.20 #71

merged 3 commits into from
Aug 14, 2023

Conversation

ShayanGsh
Copy link
Contributor

Upgraded MCProtocolLib version.

Copy link
Contributor

@Norbiros Norbiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update README.md?

@ShayanGsh
Copy link
Contributor Author

I updated the version in readme and also the build version in gradle

Copy link
Contributor

@Norbiros Norbiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bananasmoothii
Copy link

bananasmoothii commented Aug 11, 2023

I got this issue for one bot among 10 with ShayanGsh's fork:

[12:30:17] INFO | dRpkX6IR7KbuW1dy disconnected
[12:30:17] INFO |  -> java.lang.ClassCastException: class net.kyori.adventure.text.format.TextColorImpl cannot be cast to class net.kyori.adventure.text.format.NamedTextColor (net.kyori.adventure.text.format.TextColorImpl and net.kyori.adventure.text.format.NamedTextColor are in unnamed module of loader 'app')
ALL> java.lang.ClassCastException: class net.kyori.adventure.text.format.TextColorImpl cannot be cast to class net.kyori.adventure.text.format.NamedTextColor (net.kyori.adventure.text.format.TextColorImpl and net.kyori.adventure.text.format.NamedTextColor are in unnamed module of loader 'app')
        at me.creepermaxcz.mcbots.Utils.getFullText(Utils.java:45)
        at me.creepermaxcz.mcbots.Utils.getFullText(Utils.java:33)
        at me.creepermaxcz.mcbots.MainListener.packetReceived(MainListener.java:48)
        at com.github.steveice10.packetlib.tcp.TcpSession.callPacketReceived(TcpSession.java:157)
        at com.github.steveice10.packetlib.tcp.TcpSession.lambda$channelRead0$2(TcpSession.java:386)
        at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1589)
[12:30:17] INFO |
[12:30:17] INFO | Bot with MainListener removed
[12:30:17] INFO | Renewing MainListener
[12:30:17] INFO | MainListener registered for: G8nWkK8xmv9BVMpB
[12:30:17] CHAT | [T] 7] dRpkX6IR7KbuW1dy left the game
[12:30:47] CHAT | : The event has begun. Good luck, G8nWkK8xmv9BVMpB!
[12:44:10] INFO | G8nWkK8xmv9BVMpB disconnected
[12:44:10] INFO |  -> java.lang.ClassCastException: class net.kyori.adventure.text.format.TextColorImpl cannot be cast to class net.kyori.adventure.text.format.NamedTextColor (net.kyori.adventure.text.format.TextColorImpl and net.kyori.adventure.text.format.NamedTextColor are in unnamed module of loader 'app')
ALL> java.lang.ClassCastException: class net.kyori.adventure.text.format.TextColorImpl cannot be cast to class net.kyori.adventure.text.format.NamedTextColor (net.kyori.adventure.text.format.TextColorImpl and net.kyori.adventure.text.format.NamedTextColor are in unnamed module of loader 'app')
        at me.creepermaxcz.mcbots.Utils.getFullText(Utils.java:45)
        at me.creepermaxcz.mcbots.MainListener.packetReceived(MainListener.java:48)
        at com.github.steveice10.packetlib.tcp.TcpSession.callPacketReceived(TcpSession.java:157)
        at com.github.steveice10.packetlib.tcp.TcpSession.lambda$channelRead0$2(TcpSession.java:386)
        at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1589)
[12:44:10] INFO |
[12:44:10] INFO | Bot with MainListener removed
[12:44:10] INFO | Renewing MainListener
[12:44:10] INFO | MainListener registered for: jOSTQjVCbAi6m5tG
[12:44:11] CHAT | [T] 4] G8nWkK8xmv9BVMpB left the game
ALL>

When sending the message (formatted with MiniMessages): <#2FAFEE><b>Event<dark_gray>: </dark_gray><white>The event has begun.</white></b> Good luck, <player_name>!

It seems like the <b>Event<dark_gray> part got removed.

I used java -Xmx750M -jar mc-bots-1.2.8.jar -s localhost:25565 -c 10. Other infos:

System Info: Java 17 (OpenJDK 64-Bit Server VM 17.0.8+7-LTS) Host: Windows 11 10.0 (amd64)
Loading libraries, please wait...
2023-08-11 12:22:24,367 ServerMain WARN Advanced terminal features are not available in this environment
[12:22:29 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[12:22:30 INFO]: Loaded 7 recipes
[12:22:30 INFO]: Starting minecraft server version 1.20.1
[12:22:30 INFO]: Loading properties
[12:22:30 INFO]: This server is running Paper version git-Paper-98 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: a40e48f)

The paper version I am using is old, that might be an issue.

@Norbiros
Copy link
Contributor

Can you reproduce this problem while using 1.19.4 version od mc-bots?

@bananasmoothii
Copy link

I will do this in about 10 days, feel free to ping me if I forget

@Norbiros Norbiros mentioned this pull request Aug 12, 2023
@crpmax crpmax merged commit 5c12776 into crpmax:main Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants