GameRule-Extensions
A Minecraft library that provides a convenient way for mod developers to create custom game rules. The mod supports various data types and offers an extended API.
Features for Developers
Adding New Game Rules
Creating custom game rules becomes much simpler:
- Include the API file as a dependency in your project
- Use the method
GameRulesApi.registerGameRulefor registering your own rules - Standard implementations for boolean, numerical and string types are available in the library
- Create your custom
IGameRuleimplementation if needed
Reading Existing Rules
Access to any game rule can be gained via:
- Call the API method to open a connection
- Work with the gaming world through retrieved values
Features
- Simple rule creation for mod developers
- Support for different data types
- Custom implementations
- Reading and modifying values
Examples
Custom Game Rule Implementation
How to make new gaming parameters:
// Sample code omitted for brevity
Maintained by the modding development community.