diff --git a/docs/guide/README.md b/docs/guide/README.md index c031659c..3c527887 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -58,6 +58,7 @@ _NOTE: Some of mentioned features are disabled by default and you will have to t - Helpful community - Open-Source - Fast performance +- Easy Scripting/Automation - Cross-Platform - Docker Support - 10 years of continuous development @@ -110,16 +111,29 @@ If you're reporting a bug, please be descriptive as much as possible, try to exp ### Inventory, Terrain and Entity Handling -Inventory handling is currently not supported in versions: `1.4.6 - 1.9` +Inventory handling is currently not supported in versions: `1.4.6 - 1.9` (*The inventory handling code is in the place, but we're missing Item Palettes, on which we're working.*) Terrain handling is currently not supported in versions: `1.4.6 - 1.6` -Entity handling is currently not supported in versions: `1.4.6 - 1.9` (but `1.8` and `1.9` are being worked on, almost at the working state, only `EntityMetadata` packet remains to be fixed) +Entity handling is currently not supported in versions: `1.4.6 - 1.7` There features might not always be implemented in the latest version of the game, since they're often subjected to major changes by Mojang, and we need some time to figure out what has changed and to implement the required changes. If there was a major game update, and the MCC hasn't been updated to support these features, if you're a programmer, feel free to contribute to the project. +### Path-Finding and Physics + +Currently the path-finding and physics have some limitations, those are: +- Path finding under slabs is not supported (currently being worked on, partialy complete but not avaliable in the main branch) +- Swimming is not supported yet +- Jumping is not supported yet +- Knockback is not supported yet + +What is supported and works: +- Terrain navigation (path-finding with A* algorithm and walking) +- Climbing up and down the ladders and all types of vines +- Gravity + ## Credits _Project initiated by [ORelio](https://github.com/ORelio) in 2012 on the [Minecraft Forum](http://www.minecraftforum.net/topic/1314800-/)._ diff --git a/docs/guide/chat-bots.md b/docs/guide/chat-bots.md index 7678b41d..cddb1019 100644 --- a/docs/guide/chat-bots.md +++ b/docs/guide/chat-bots.md @@ -29,27 +29,32 @@ redirectFrom: ## List of built-in Chat Bots -- [Alerts](#alerts) -- [Anti AFK](#anti-afk) -- [Auto Attack](#auto-attack) -- [Auto Craft](#auto-craft) -- [Auto Dig](#auto-dig) -- [Auto Drop](#auto-drop) -- [Auto Eat](#auto-eat) -- [Auto Fishing](#auto-fishing) -- [Auto Relog](#auto-relog) -- [Auto Respond](#auto-respond) -- [Chat Log](#chat-log) -- [Discord Bridge](#discord-bridge) -- [Farmer](#farmer) -- [Follow Player](#follow-player) -- [Hangman](#hangman) -- [Mailer](#mailer) -- [Map](#map) -- [PlayerList Logger](#playerlist-logger) -- [Remote Control](#remote-control) -- [Replay Mod](#replay-mod) -- [Script Scheduler](#script-scheduler) +- [Chat Bots](#chat-bots) + - [About](#about) + - [List of built-in Chat Bots](#list-of-built-in-chat-bots) + - [Alerts](#alerts) + - [Anti AFK](#anti-afk) + - [Auto Attack](#auto-attack) + - [Auto Craft](#auto-craft) + - [Auto Dig](#auto-dig) + - [Auto Drop](#auto-drop) + - [Auto Eat](#auto-eat) + - [Auto Fishing](#auto-fishing) + - [Auto Relog](#auto-relog) + - [Auto Respond](#auto-respond) + - [Chat Log](#chat-log) + - [Discord Bridge](#discord-bridge) + - [Farmer](#farmer) + - [Follow player](#follow-player) + - [Hangman](#hangman) + - [Mailer](#mailer) + - [Map](#map) + - [PlayerList Logger](#playerlist-logger) + - [Remote Control](#remote-control) + - [Replay Capture](#replay-capture) + - [Script Scheduler](#script-scheduler) + - [Telegram Bridge](#telegram-bridge) + - [Items Collector](#items-collector) ## Alerts @@ -1264,6 +1269,12 @@ redirectFrom: +

Warning

+ + **If you want to use variables from this chat bot in scripts, currently that does not work. You will have to use a C# script in that case. We are working on getting this functionality back.** + +
+ - **Description:** This setting specifies the path to the file which contains the list of rules for detecting of keywords and responding on them. @@ -1294,7 +1305,7 @@ redirectFrom: - **Type:** `boolean` - - **Default:** `true` + - **Default:** `false` ## Chat Log @@ -1391,7 +1402,7 @@ redirectFrom: Enable `Message Content Intent`, `Server Members Intent` and `Presence Intent`. ![Image](/images/guide/Discord_Reset_Token.png) - ![Image](/images/guide/Discord_Privileged_Intents.png) + ![Image](https://i.pics.rs/AAhyx.png)

Warning

@@ -2333,3 +2344,241 @@ redirectFrom: Trigger_On_Interval = { Enable = false, MinTime = 1.0, MaxTime = 10.0 } Action = "send /login pass" ``` + +## Telegram Bridge + +- **Description:** + + This bot allows you to send and receive messages and commands via a Telegram Bot DM or to receive messages in a Telegram channel. + +

Warning

+ + **You can't send messages and commands from a group channel, you can only send them in the bot DM, but you can get the messages from the client in a group channel.** + +
+ +- **Setup:** + + 1. First you need to create a Telegram bot and obtain an API key, to do so, go to Telegram and find @botfather + 2. Click on `Start` button and read the bot reply, then type `/newbot`, the Botfather will guide you through the bot creation. + 3. Once you create the bot, copy the **API key** that you have gotten, and put it into the `Token` field of `ChatBot.TelegramBridge` section (this section). + +

Danger

+ + **Do not share this token with anyone else as it will give them the control over your bot. Save it securely.** + +
+ + 4. Then launch the client and go to Telegram, find your newly created bot by searching for it with its username, and open a DM with it. + 5. Click on `Start` button and type and send the following command `.chatid` to obtain the chat id. + 6. Copy the chat id number (eg. `2627844670`) and paste it in the `ChannelId` field and add it to the `Authorized_Chat_Ids` field (in this section) (an id in "Authorized_Chat_Ids" field is a number/long, not a string!), then save the file. + Now you can use the bot using it's DM. + +

Danger

+ + **If you do not add the id of your chat DM with the bot to the "Authorized_Chat_Ids" field, ayone who finds your bot via search will be able to execute commands and send messages!** + +
+ +

Danger

+ + **An id pasted in to the "Authorized_Chat_Ids" should be a number/long, not a string!** + +
+ +- **Settings:** + + **Section:** **`ChatBot.TelegramBridge`** + + #### `Enabled` + + - **Description:** + + This setting specifies if the Telegram Bridge Chat Bot is enabled. + + - **Available values:** `true` and `false`. + + - **Type:** `boolean` + + - **Default:** `false` + + #### `Token` + + - **Description:** + + Your Telegram Bot token. + + - **Type:** `string` + + - **Default:** empty + + #### `ChannelId` + + - **Description:** + + An ID of a channel where you want to interact with the MCC using the bot. + + - **Type:** `string` + + - **Default:** empty + + #### `Authorized_Chat_Ids` + + - **Description:** + + A list of Chat IDs that are allowed to send messages and execute commands. + To get an id of your chat DM with the bot use `.chatid` bot command in Telegram. + + - **Type:** `array of strings` + + - **Default:** empty + + #### `Message_Send_Timeout` + + - **Description:** + + How long to wait (in seconds) if a message can not be sent to Telegram before canceling the task (minimum 1 second). + + - **Type:** `integer` + + - **Default:** 3 + + **Message Formats** + + Words wrapped with `{` and `}` are going to be replaced during the code execution, do not change them! + For example, `{message}` is going to be replace with an actual message, `{username}` will be replaced with an username, `{timestamp}` with the current time. + For Telegram message formatting, check the following: https://mccteam.github.io/r/tg-fmt.html + + #### `PrivateMessageFormat` + + - **Description:** + + A format that is used to display a private chat message on the minecraft server, in a Telegram channel. + + - **Type:** `string` + + - **Default:** `*(Private Message)* {username}: {message}` + + #### `PublicMessageFormat` + + - **Description:** + + A format that is used to display a public chat message on the minecraft server, in a Telegram channel. + + - **Type:** `string` + + - **Default:** `{username}: {message}` + + #### `TeleportRequestMessageFormat` + + - **Description:** + + A format that is used to display a teleport request on the minecraft server, in a Telegram channel. + + - **Type:** `string` + + - **Default:** `A new Teleport Request from **{username}**!` + +## Items Collector + +- **Description:** + + Collect items on the ground using this Chat Bot. + +- **Settings:** + + **Section:** **`ChatBot.ItemsCollector`** + + #### `Enabled` + + - **Description:** + + This setting specifies if the Items Collector Chat Bot is enabled. + + - **Available values:** `true` and `false`. + + - **Type:** `boolean` + + - **Default:** `false` + + #### `Collect_All_Item_Types` + + - **Description:** + + Specifies if the bot will collect all items, regardless of their type. + If you want to use the whitelisted item types, disable this by setting it to `false`. + + - **Available values:** `true` and `false`. + + - **Type:** `boolean` + + - **Default:** `false` + + #### `Items_Whitelist` + + - **Description:** + + In this list you can specify which items the bot will collect. + To enable this, set the `Collect_All_Item_Types` to false. + +

Note

+ + **This does not prevent the bot from accidentally picking up other items, it only goes to positions where it finds the whitelisted items** + +
+ +

Note

+ + **You can see the list of item types [here](https://raw.githubusercontent.com/MCCTeam/Minecraft-Console-Client/master/MinecraftClient/Inventory/ItemType.cs)** + +
+ + - **Available values:** [Item Type List](https://raw.githubusercontent.com/MCCTeam/Minecraft-Console-Client/master/MinecraftClient/Inventory/ItemType.cs) + + - **Type:** `array of strings with item names` + + - **Default:** `[ "Diamond", "NetheriteIngot" ]` + + #### `Delay_Between_Tasks` + + - **Description:** + + Delay in milliseconds between bot scanning items (Recommended: 300-500) + + - **Type:** `integer` + + - **Default:** `300` + + #### `Collection_Radius` + + - **Description:** + + The radius of blocks in which bot will look for items to collect. + + - **Type:** `double` + + - **Default:** `30.0` + + #### `Always_Return_To_Start` + + - **Description:** + + Specifies if the bot will return to it's starting position after there are no items to collect. + + - **Available values:** `true` and `false`. + + - **Type:** `boolean` + + - **Default:** `true` + + #### `Prioritize_Clusters` + + - **Description:** + + Specifies if the bot will go after clustered items instead for the closest ones. + + - **Available values:** `true` and `false`. + + - **Type:** `boolean` + + - **Default:** `true` \ No newline at end of file diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 0f218fdb..38c52cd9 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -412,7 +412,7 @@ Coordinate = { x = 145, y = 64, y = 2045 }

Warning

- **This feature is currently not supported in `1.4.6 - 1.9`.** + **This feature is currently not supported in `1.4.6 - 1.9`. But we are working on getting it supported in 1.8 and 1.9.**
@@ -428,7 +428,7 @@ Coordinate = { x = 145, y = 64, y = 2045 }

Warning

- **This feature is currently not supported in `1.4.6 - 1.9`.** + **This feature is currently not supported in `1.4.6 - 1.7`.**
diff --git a/docs/guide/installation.md b/docs/guide/installation.md index dc2b01cf..cf1db6f0 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -35,6 +35,12 @@ Requirements: - [Git](https://www.git-scm.com/) - [.NET 7.0 or new-er](https://dotnet.microsoft.com/en-us/download) or [Visual Studio](https://visualstudio.microsoft.com/) configured for C# app development +

Tip

+ + **If you want to modify the code, and you are new to C# or in programming in general, you might want to watch some C# tutorials, we recommend the ones listed in [Creating Bots](creating-bots.md#requirements) section.** + +
+ #### Cloning using Git Install [Git](https://www.git-scm.com/) @@ -77,7 +83,7 @@ git clone https://github.com/MCCTeam/Minecraft-Console-Client.git --recursive 6. Right click on `MinecraftClient` solution in the `Solution Explorer` 7. Click `Build` -If the build has succeeded, the compiled binary `MinecraftClient.exe` will be in `MinecraftClient/bin/Release/net6.0/win-x64/publish` folder. +If the build has succeeded, the compiled binary `MinecraftClient.exe` will be in `MinecraftClient/bin/Release/net7.0/win-x64/publish` folder. #### Building using .NET manually without Visual Studio @@ -89,7 +95,7 @@ If the build has succeeded, the compiled binary `MinecraftClient.exe` will be in dotnet publish MinecraftClient -f net7.0 -r win-x64 --no-self-contained -c Release -p:UseAppHost=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None ``` -If the build has succeeded, the compiled binary `MinecraftClient.exe` will be in `MinecraftClient/bin/Release/net6.0/win-x64/publish` folder. +If the build has succeeded, the compiled binary `MinecraftClient.exe` will be in `MinecraftClient/bin/Release/net7.0/win-x64/publish` folder. ### Linux, macOS @@ -107,7 +113,7 @@ Requirements: - [Install Git on macOS](https://git-scm.com/download/mac) -- .NET SDK 6.0 or new-er +- .NET SDK 7.0 or new-er - [Install .NET on Linux](https://docs.microsoft.com/en-us/dotnet/core/install/linux) - [Install .NET on macOS](https://docs.microsoft.com/en-us/dotnet/core/install/macos) @@ -344,7 +350,7 @@ Once the installation is complete, you can start Ubuntu with: #### Installing .NET on ARM -Since there are issues installing .NET 6.0 via the APT package manager at the time of writing, we will have to install it manually. +Since there are issues installing .NET 7.0 via the APT package manager at the time of writing, we will have to install it manually. First we need to update the APT package manager repositories and install dependencies. @@ -368,27 +374,27 @@ Navigate to your `/root` home directory with the following command: cd /root ``` -First you need to download .NET 6.0, you can do it with the following command: +First you need to download .NET 7.0, you can do it with the following command: ```bash -wget https://download.visualstudio.microsoft.com/download/pr/901f7928-5479-4d32-a9e5-ba66162ca0e4/d00b935ec4dc79a27f5bde00712ed3d7/dotnet-sdk-6.0.400-linux-arm64.tar.gz +wget https://download.visualstudio.microsoft.com/download/pr/6cd2eaa7-4c06-4168-b90b-ee2d6bb40b10/4a8387eb07e17d262bfb9965f6d34462/dotnet-sdk-7.0.203-linux-arm64.tar.gz ```

Tip

-**This tutorial assumes that you have 64 bit version of ARM processor, if you happen to have a 32-bit version replace the link in the command above with [this one](https://download.visualstudio.microsoft.com/download/pr/cf567026-a29a-41aa-bc3a-e4e1ad0df480/0925d411e8e09e31ba7a39a3eb0e29af/aspnetcore-runtime-6.0.8-linux-arm.tar.gz)** +**This tutorial assumes that you have 64 bit version of ARM processor, if you happen to have a 32-bit version replace the link in the command above with [this one](https://download.visualstudio.microsoft.com/download/pr/55972ef4-146e-47e6-b014-0163cbaca6a3/fa9713f73f44088898843016d68c5929/dotnet-sdk-7.0.203-linux-arm.tar.gz)**

Tip

-**This tutorial assumes that you're following along and using Ubuntu 22.04, if you're using a different distro, like Alpine, go to [here](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) and copy an appropriate link for your distro.** +**This tutorial assumes that you're following along and using Ubuntu 22.04, if you're using a different distro, like Alpine, go to [here](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) and copy an appropriate link for your distro.**
Once the file has been downloaded, you need to run the following commands in order: -1. `DOTNET_FILE=dotnet-sdk-6.0.400-linux-arm64.tar.gz` +1. `DOTNET_FILE=dotnet-sdk-7.0.203-linux-arm64.tar.gz`

Warning

@@ -997,9 +1003,9 @@ If did everything correctly you should see a Linux prompt and a welcome message You can do `whoami` to see your username. -Now you can install .NET Core 6 and MCC. +Now you can install .NET Core 7 and MCC. -### Installing .NET Core 6 +### Installing .NET Core 7

Tip

@@ -1009,7 +1015,7 @@ Now you can install .NET Core 6 and MCC.

Warning

-**With newer versions of .NET Core 6 on Ubuntu 22.04 you might get the following error: `A fatal error occurred, the folder [/usr/share/dotnet/host/fxr] does not contain any version-numbered child folders`, if you get it, use [this solution](https://github.com/dotnet/sdk/issues/27082#issuecomment-1211143446)** +**With newer versions of .NET Core 7 on Ubuntu 22.04 you might get the following error: `A fatal error occurred, the folder [/usr/share/dotnet/host/fxr] does not contain any version-numbered child folders`, if you get it, use [this solution](https://github.com/dotnet/sdk/issues/27082#issuecomment-1211143446)**
@@ -1051,10 +1057,10 @@ Remove the file, we do not need it anymore: rm packages-microsoft-prod.deb ``` -Finally, install .NET Core 6: +Finally, install .NET Core 7: ```bash -sudo apt-get update -y && sudo apt-get install -y dotnet-sdk-6.0 +sudo apt-get update -y && sudo apt-get install -y dotnet-sdk-7.0 ``` Run the following command to check if everything was installed correctly: @@ -1085,7 +1091,7 @@ If it was successful, you can now install the MCC. ### Installing MCC on a VPS -Now that you have .NET Core 6.0 and a user account, you should install the `screen` utility, you will need this in order to keep the MCC running once you close down the SSH session (if you do not have it, the MCC will just stop working once you disconnect). You can look at the `screen` like a window, except it's in a terminal, it lets you have multiple "windows" open at the same time. +Now that you have .NET Core 7.0 and a user account, you should install the `screen` utility, you will need this in order to keep the MCC running once you close down the SSH session (if you do not have it, the MCC will just stop working once you disconnect). You can look at the `screen` like a window, except it's in a terminal, it lets you have multiple "windows" open at the same time.

Tip

diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 1ece0c37..c8e1ed52 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -108,7 +108,6 @@ MinecraftClient.exe --help ```bash MinecraftClient.exe --help MinecraftClient.exe -MinecraftClient.exe "/mycommand" MinecraftClient.exe --setting=value [--other settings] MinecraftClient.exe --section.setting=value [--other settings] MinecraftClient.exe [--other settings]