Skip to content

TheVeryStarlk/Amethyst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amethyst

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.

Getting Started

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;
}));

Usage

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);
}));

Credits

  • Minecraft Wiki for the amazing documentations about the game's internal technical details.
  • Obsidian for being an awesome reference.

About

A light-weight implementation of the Minecraft Java edition server protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages