Registry (For discussion only)

Ok, here is my idea for a way to handle BlockMaterials, ItemMaterials, EntityMaterials etc.

Atm only BlockMaterials is done, and I didn't create any abstract classes or interfaces really.

Most code is in api/material, api/material/block and engine/registry

The plugin running the game will create a registry and pass the kind of registry it want's to use (yaml etc) to it. It will than initialize the registry which will normally load it if the registry is already on file and if it is a server.

Loading the registry means that the mapping ID = MaterialName is done, nothing more, after that the materials need to be added still.

Base / Fallback material can only be used from the plugin holding the registry, custom material can come from other plugins.

you can remove a custom blockMaterial in which case we will fallback to an older version or to the base material.

Client handshake will handle this with a specific packet which will send over the registry to the client, after that the client will need to start adding the blockMaterials.

I guess implementing server-client-handshake will require some rework in the init and check init part, we should only init the registry if the yamlregistry for example is already transmitted.

Feedback?????
you need too, fallback material must be something that ALL plugins for that "game" understand, otherwise any plugin can register a fallback material (why honestly???) and other plugins don't understand that and will generate errors... and if your "game" support also an external client that client will either crash or get blocks he can't display.