willemml / hl-mc-kt Goto Github PK
View Code? Open in Web Editor NEWHeadless Minecraft Client written in Kotlin
License: GNU General Public License v3.0
Headless Minecraft Client written in Kotlin
License: GNU General Public License v3.0
When the bots connects, it makes an error:
Exception in thread "main" com.github.steveice10.mc.auth.exception.request.RequestException: Migrated
at com.github.steveice10.mc.auth.util.HTTP.checkForError(HTTP.java:100)
at com.github.steveice10.mc.auth.util.HTTP.makeRequest(HTTP.java:75)
at com.github.steveice10.mc.auth.service.AuthenticationService.login(AuthenticationService.java:201)
at com.github.steveice10.mc.protocol.MinecraftProtocol.createAuthServiceForPasswordLogin(MinecraftProtocol.java:285)
at com.github.steveice10.mc.protocol.MinecraftProtocol.<init>(MinecraftProtocol.java:245)
at net.willemml.hlktmc.minecraft.BasicClient.<init>(BasicClient.kt:50)
at net.willemml.hlktmc.minecraft.bot.ChatBot.<init>(ChatBot.kt:12)
at net.willemml.hlktmc.minecraft.bot.ChatBotManager.startBot$hl_mc_kt(Manager.kt:12)
at net.willemml.hlktmc.minecraft.bot.ChatBotManager.startBot$hl_mc_kt(Manager.kt:11)
at net.willemml.hlktmc.BotManager.start(BotManager.kt:63)
at net.willemml.hlktmc.cli.commands.LaunchBotKt$launchMinecraftBot$1.invoke(LaunchBot.kt:31)
at net.willemml.hlktmc.cli.commands.LaunchBotKt$launchMinecraftBot$1.invoke(LaunchBot.kt)
at net.willemml.ktcmd.Command.run(Command.kt:328)
at net.willemml.ktcmd.Command.execute(Command.kt:307)
at net.willemml.ktcmd.CommandManager.runCommand(Manager.kt:71)
at net.willemml.hlktmc.cli.CLI.<init>(CLI.kt:26)
at MainKt.main(Main.kt:26)
at MainKt.main(Main.kt)
Need to have full Minecraft protocol implementations, I am open to using an open source Kotlin library to do so.
sourtaste000@pineapple-2 hl-mc-kt % ./gradlew build
> Task :compileKotlin FAILED
e: /Users/sourtaste000/hl-mc-kt/src/main/kotlin/protocol/NBT.kt: (82, 28): Too many arguments for public abstract fun get(): Byte defined in java.nio.ByteBuffer
e: /Users/sourtaste000/hl-mc-kt/src/main/kotlin/protocol/NBT.kt: (82, 31): Too many arguments for public abstract fun get(): Byte defined in java.nio.ByteBuffer
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
1 actionable task: 1 executed
sourtaste000@pineapple-2 hl-mc-kt %
Need to have correct Minecraft chat message parsing, should work on any server that Mojang's official client can connect to.
Packet passthrough, should open a server that normal clients can connect to, then packets should be passed from client to real server and back, should still be able to control player and read events like chat and movement while client is connected.
isEmpty(): Boolean
usages should be replaced, affected files:
LaunchBot.kt: (23, 37) and (24, 37)
BasicClient.kt: (47, 29)
ChatBot.kt: (26, 79)
Docker image to run this bot/client in
This should eventually have pathing of some kind, emulating baritone.
#17 needs to be done first though...
Events for when packets are received in a byte channel.
Need to make connecting to Minecraft server sockets actually work.
Method should get the UUID of the current player logged into a client as the server says it is, not just as the client says.
Need a method to get currently online players in the server a client is connected to, should also have methods for getting names from UUIDs and UUIDs from names.
Need good methods for reading and writing UBytes/UShorts to/from Sockets as well as VarInts and VarLongs, check https://wiki.vg/Protocol#Data_types for more info.
Movement physics calculations need to be redone, gravity should be properly implemented to avoid bots getting kicked for fly.
Hi,
When building, I'm getting this error:
> Task :compileKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve net.daporkchop.lib:minecraft-text:0.5.5-20201106.114836-37.
Required by:
project :
> Could not resolve net.daporkchop.lib:minecraft-text:0.5.5-20201106.114836-37.
> Could not get resource 'https://dl.bintray.com/kotlin/ktor/net/daporkchop/lib/minecraft-text/0.5.5-SNAPSHOT/minecraft-text-0.5.5-20201106.114836-37.pom'.
> Could not GET 'https://dl.bintray.com/kotlin/ktor/net/daporkchop/lib/minecraft-text/0.5.5-SNAPSHOT/minecraft-text-0.5.5-20201106.114836-37.pom'. Received status code 502 from server: Bad Gateway
This API should have various endpoints for controlling client instances in the headless client, should be able to create them, destroy them, and control them, sending messages, executing commands, etc...
Add full documentation of public API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.