在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ddevault/Craft.Net开源软件地址(OpenSource Url):https://github.com/ddevault/Craft.Net开源编程语言(OpenSource Language):C# 100.0%开源软件介绍(OpenSource Introduction):Craft.NetCraft.Net is a collection of several Minecraft-related .NET libraries. You can pick and choose different libraries from Craft.Net to accomplish different tasks. The following libraries are included:
More libraries are planned for the future. All libraries in Craft.Net support Windows, Linux, and Mac. The long-term goal is to recreate the entire Minecraft ecosystem in C#, and to offer interopability with vanilla Minecraft. A note on submodules: Craft.Net includes external dependencies in the form of git submodules. When cloning
Craft.Net, please use The latest supported Minecraft version is 1.7.5. Classic SupportThere is work-in-progress support for Minecraft classic. The following libraries are available:
Libraries like Craft.Net.Classic.Server, Craft.Net.Classic.Client, Craft.Net.Classic.Level, and more are also planned. Community and Related ProjectsThere's an active Craft.Net development, discussion, and support community on IRC. Join us to chat at #craft.net on irc.freenode.net. This is the best place to ask questions. You can also let us know if you are doing anything cool with Craft.Net, like these related projects:
Snapshot SupportCraft.Net often supports Minecraft pre-release snapshots. If you want to try it out, look at the snapshot
branch. Run the following command to get snapshot support: This branch has bleeding-edge support for the upcoming version of Minecraft. HTTPS Certificates on MonoMono does not trust any certificates whatsoever after install, and you need to tell it which ones to trust.
This means that Craft.Net.Client will fail to log into minecraft.net when connecting to online-mode servers.
The easiest way to fix this is to just trust all the Mozilla root certificates by running
UsageCraft.Net is a very large, expansive project. A basic overview will be given here, but you are encouraged to visit the wiki to learn more about specific sub-projects. Generic NetworkingYou can use Craft.Net.Networking to work with the Minecraft network protocol. Craft.Net.Networking depends on
Craft.Net.Data to describe Minecraft data types. To use it, create a MinecraftStream around a NetworkStream,
and then you can use the ServersHere's an example of using Craft.Net.Server to run a Minecraft server: var server = new MinecraftServer(new IPEndPoint(IPAddress.Any, 25565));
var generator = new FlatlandGenerator();
// Creates a level in the "world" directory, using the flatland generator
// You may omit "world" to create a level in memory.
minecraftServer.AddLevel(new Level(generator, "world"));
minecraftServer.Start(); ClientsHere's an example of connecting to a Minecraft server with Craft.Net.Client: var session = new Session("PlayerName");
// Uncomment this code to use the user's saved lastlogin instead
//var lastLogin = LastLogin.GetLastLogin();
//var session = Session.DoLogin(lastLogin.Username, lastLogin.Password);
var client = new MinecraftClient(session);
// Connect to the server at 127.0.0.1:25565
client.Connect(new IPEndPoint(IPAddress.Loopback, 25565));
// Alternative:
//client.Connect("server.address.here:25565"); Session.DoLogin can be used to authenticate with minecraft.net for online-mode servers. This code also includes a (commented out) example of decrypting the user's LastLogin file. World EditingYou can use Craft.Net.World do manipulate Minecraft save data. You can also add a reference to Craft.Net.Logic
to get some nice extension methods that let you work with blocks by name
(ex. var level = Level.LoadFrom("world");
level.DefaultWorld.SetBlockId(Coordinates3D.Zero, 22); // Set to lapis block
level.Save(); If Craft.Net supports the terrain generator the level.dat file specifies, it will automatically generate chunks when attempting to work with blocks in an ungenerated area. You can also explicitly set the terrain generator from the constructor. You may add support for your own generators by implementing IWorldGenerator. Building from sourceOn Windows, add "C:\Windows\Microsoft.NET\Framework\v4.0.30319" to your path. Then, run this from the root of the repository:
On Linux and Mac, install Mono 2.10 or better, and then use this command:
You can also build Craft.Net with Visual Studio 2010 or newer, and any version of MonoDevelop or SharpDevelop. ContributingIf you wish to contribute your own code to Craft.Net, please create a fork. You are encouraged to follow the code standards currently in use, and pull requests that do not will be rejected. You are also encouraged to make small, focused pull requests, rather than large, sweeping changes. For such changes, it would be better to create an issue instead. You can browse other pull requests and see which of them have been accepted for more guidance. Getting helpYou can get help by making an issue on GitHub, or joining #craft.net on irc.freenode.net. If you are already knowledgable about using Craft.Net, consider contributing to the wiki for the sake of others. DependenciesWe try to keep these to a minimum, and refactor them away when possible. The current list is:
LicensingCraft.Net uses the permissive MIT license. In a nutshell:
Minecraft is not officially affiliated with Craft.Net. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论