Rattle is an integration project which combines a fully-featured physics engine backend into a server-side environment, allowing a game world's state (blocks, entities, etc.) to influence the physics state, and allow that physics state to be displayed to clients via vanilla packets (no client mod required).
The project currently uses the Rapier backend, a rigid-body
physics library, with Java bindings via rapier-ffi's
rapier-java
module, and integrated in the rattle-rapier
module.
This project requires Java 19, and the --enable-preview
--enable-native-access=ALL-UNNAMED
flags!
Minecraft is a game that does not have advanced 3D physics - the limits of what it can do is basically ray-tests and simple AABB collision response. However, physics simulations are really cool, and having it integrate cleanly with the world would be even more impressive.
The code is implemented as generically as possible to run on the server-side rather than the client-side, because it means that:
There have already been projects which integrate some degree of rigid-body physics into the game, however those are mainly used for one-off specific features, and most are client-side mods. Rattle acts instead as a framework for other projects to use to integrate physics into a world.
Download the latest unstable (snapshot) version from GitHub Actions:
build/libs/
rattle-[platform]-[version].jar
into your platform's mods or plugins folderSee the version badges for the latest release and snapshot builds.
Modules:
rattle-api
- platform-independent APIrattle-rapier
- Rapier physics engine implementationrattle-common
- common library for implementing the API onto a platformrattle-paper
- Paper implementationrattle-fabric
- Fabric implementationrepositories {
mavenCentral()
// for snapshot builds
// maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
implementation("io.github.aecsocket", "rapier-MODULE", "VERSION")
}