Skip to main content

Design Philosophy

Flourish priorities developer experience and user experience over anything else.

This means, we try to abstract away and make it easy for the developer to implement new features.

There is one important thing to note, there is no registries. Yes, none, other then maybe one for the stores, since those aren't meant to be added onto.

Registering Features

Normally, features are registered via their appropiate annotation, the appropiate feature loader will scan the .impl package to get all of the annotations.

An example of a command would be

@Command(name = "test")
public class TestCommand {
public static void init(LiteralArgumentBuilder<FlourishSource> builder) {
builder.executes(ctx -> {
ctx.getSource().sendFeedback(Component.literal("hi!"));
return 1;
});
}
}

And thats it, /test is now available in game! No registries, you see how this can be nice, right?

The Event Strategy

Every mixin should ideally call a event. Who knows, someone else might need the same inject point later, and that becomes a whole mess, this is solved by creating events.