Minecraft API uses an interface-based architecture, and heavily relies on static factory methods for object creation. Some interfaces are therefore dependent on implementations provided by another component of the system. These implementation are currently provided by a SPI inspired system. This system is very fragile, and does not propagate compile errors, when new dependencies are added, or if implementations are not provided.
Goal:
The goal is to provide a new API that is type-safe and robust, so you cannot accidentally forget to provide an implementation for a dependency. This greatly improves maintainability by promoting runtime errors to compile time errors. It is also especially useful when expanding the API, or implementing Minecraft API for other versions.
Motivation:
Minecraft API uses an interface-based architecture, and heavily relies on static factory methods for object creation. Some interfaces are therefore dependent on implementations provided by another component of the system. These implementation are currently provided by a SPI inspired system. This system is very fragile, and does not propagate compile errors, when new dependencies are added, or if implementations are not provided.
Goal:
The goal is to provide a new API that is type-safe and robust, so you cannot accidentally forget to provide an implementation for a dependency. This greatly improves maintainability by promoting runtime errors to compile time errors. It is also especially useful when expanding the API, or implementing Minecraft API for other versions.