MineSharp
January 26, 2024 ยท View on GitHub

MineSharp
This Project is not finished and under development!
MineSharp is a framework to work with minecraft.
My goal is to create a bot framework which is able to do anything you can do in the vanilla client,
but theoretically MineSharp could also be used to create a Server or custom client.
Currently MineSharp works with Minecraft Java 1.18 - 1.20.4.
If you're interested in this project, feel free to contribute!
Current features
- โจ Supported Versions: 1.18.x - 1.20.4
- ๐ Player Stats
- โก Events
- ๐ Entity tracking
- ๐ World tracking (query the world for blocks)
- โ๏ธ Mining (very simple, needs some more work)
- ๐ทโโ๏ธ Building (very simple, needs some more work)
- ๐ ๏ธ Crafting
- ๐ช High-Level window Api
- โ๏ธ Attacking entities
- ๐ Movements (Walking, Sprinting, Jumping, Sneaking)
- ๐ Chat (Reading and Writing)
Roadmap
- ๐ Simple Pathfinder (see feature/pathfinder)
Example Snippet
See MineSharp.Bot for more information about creating bots.
using MineSharp.Bot;
using MineSharp.Bot.Plugins;
MineSharpBot bot = await new BotBuilder()
.Host("localhost")
.OfflineSession("MineSharpBot")
.CreateAsync();
ChatPlugin chat = bot.GetPlugin<ChatPlugin>();
if (!await bot.Connect())
{
Console.WriteLine("Could not connect to server! Is the server running?");
Environment.Exit(1);
}
while (true)
{
var input = Console.ReadLine();
if (input == "exit")
{
await bot.Disconnect();
break;
}
if (input != null)
await chat.SendChat(input);
}
Credits
Without the following resources this project would not be possible. Thanks to all people involved in those projects!