Gravity Changer
Mod Overview
Gravity Changer is a Fabric modification that provides the ability to change gravity direction for players. This project includes both functional features and a programming interface for developers of other mods.
Main Features
The mod adds six special items to the game, each allowing to change gravity direction along one of the six coordinate axes. Currently, these items cannot be crafted - they are available exclusively in creative mode in the tools tab.
In addition to the main functionality, Gravity Changer serves as an API library, allowing other modifications to integrate the gravity changing system into their projects.
Required Dependencies
For proper operation, installation of Fabric API and Cloth Config is required.
Optional Dependencies
For convenient configuration, installation of Mod Menu is recommended, although this is not a mandatory requirement.
Configuration
The mod's configuration file is located at .minecraft/config/gravitychanger.json. Settings can be edited either manually or through the Mod Menu interface.
The configuration is divided into two categories: Client and Server. Client settings affect only the local game and must be set on the client side. Server parameters work exclusively on the server and require editing the server configuration file.
In singleplayer, the client and server use a shared configuration file, so changes can be made through Mod Menu. When playing on a multiplayer server, changes to client settings do not affect the server configuration - it must be edited directly in the server file.
Commands
/gravity get <player> - displays the current gravity direction of the specified player as a numerical index (0-5)
/gravity set <direction> <players> - sets gravity direction for selected players
/gravity rotate <direction> <players> - changes gravity relative to the look direction of selected players
/gravity randomise <players> - randomly changes gravity for specified players