MinecraftConnectionBE 1.0.0-beta1

This is a prerelease version of MinecraftConnectionBE.
dotnet add package MinecraftConnectionBE --version 1.0.0-beta1
NuGet\Install-Package MinecraftConnectionBE -Version 1.0.0-beta1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MinecraftConnectionBE" Version="1.0.0-beta1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MinecraftConnectionBE --version 1.0.0-beta1
#r "nuget: MinecraftConnectionBE, 1.0.0-beta1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MinecraftConnectionBE as a Cake Addin
#addin nuget:?package=MinecraftConnectionBE&version=1.0.0-beta1&prerelease

// Install MinecraftConnectionBE as a Cake Tool
#tool nuget:?package=MinecraftConnectionBE&version=1.0.0-beta1&prerelease

MinecraftConnectionBE

Nuget (with prereleases) Nuget alternate text is missing from this package README image GitHub

日本語版はこちら

MinecraftConnectionBE is a command sending library for MinecraftBE or Minecraft Education. It can be useful for automation and programming learning.

1. Preparation

First, launch MinecraftBE or Minecraft Education. In the settings section, set "Require Encrypted Websockets" to Off.

alternate text is missing from this package README image

2. Create Project

This library is intended for .NET Standard 2.1 and above. This section describes how to create a .NET 6 console application.

Install MinecraftConnectionBE with the NuGet package manager, or run the following command in the package manager console.

Install-Package MinecraftConnectionBE -Version 1.0.0-beta1

or

dotnet add package MinecraftConnectionBE -v 1.0.0-beta1

3. Sample Programs

After running the program, use the /connect command in Minecraft to connect to the server.

For example:

/connect 127.0.0.1:8080

3.1 Chat with AI

An OpenAI API key is always required to chat with an AI. If you have not obtained one, please click here to access and confirm it.

First, specify the IP address and port number to prepare the WebSocket server. Next, call the ChatAI() method from the instance and assign the API key and the player ID to be conversed with, each as a string type. Using the Console.Readkey() method, the server is open until a key is pressed.

using MinecraftConnectionBE;
using System.Net;

var address = IPAddress.Parse("127.0.0.1");
var port = 8080;
var apiKey = "<Your API key>";

var command = new MinecraftCommands(address, port);
command.AIChat(apiKey, "<Your ID>");
Console.ReadKey();

Result:

alternate text is missing from this package README image

3.2 Send command

You can trigger a chat message to execute a specific command. Use the SubscribeCommand() method to execute the command.

using MinecraftConnectionBE;
using System.Net;

var address = IPAddress.Parse("127.0.0.1");
var port = 8080;

var command = new MinecraftCommands(address, port);
command.SubscribeCommand("time set night", "night");
Console.ReadKey();

Result:

alternate text is missing from this package README image

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-beta1 84 4/22/2023

Beta release
- You can chat with them using the OpenAI API.
- The SubscribeCommand() method can be used to execute commands triggered by chat.