A light-weight library targeting a specific protocol version for developing Minecraft servers. Amethyst is customizable and sacrifices many of the vanilla features in favor of performance and memory usage.
Implementing ISubscriber and registering Amethyst by services.AddAmethyst<FooSubscriber>();
is all you need to get a running Amethyst server.
However, you need to create/specify a world for players to join to.
registry.For<IClient>(consumer => consumer.On<Joining>((_, joining) =>
{
var world = worldFactory.Create("Empty", EmptyGenerator.Instance);
joining.World = world;
}));
Amethyst by default has very little built-in logic, the way you implement logic is by subscribing to events. The following example sends a welcome message when a player joins.
registry.For<IPlayer>(consumer => consumer.On<Joined>((player, _) =>
{
var message = Message.Simple($"Welcome {player.Username}!");
player.Send(message);
}));
- Minecraft Wiki for the amazing documentations about the game's internal technical details.
- Obsidian for being an awesome reference.