Skip to content

TogAr2/MinestomFluids

Repository files navigation

MinestomFluids

license platform

MinestomFluids is a simple library for Minestom, which adds fluid mechanics.

The maven repository is available on jitpack.

Usage

To use the library, add it as a dependency to your project.

Before using it, you should call MinestomFluids.init(). This will register the custom BlockPlacementRule that allows the fluids to detect when a neighbour changes. After you've initialized the extension, you can get an EventNode containing listeners which provide fluid ticking using MinestomBlocks.events(). By adding this node as a child to any other node, you enable the fluids in that scope.

Example:

MinestomFluids.init();
MinecraftServer.getGlobalEventHandler().addChild(MinestomFluids.events());

MinestomFluids will call a WaterBlockBreakEvent upon breaking a block, which can be cancelled to prevent the action.

Contributing

You are welcome to open an issue or pull request.

About

Fluid/liquid library for Minestom

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages