Trove
Loot table parser and evaluator for Minestom.
Install / Use
/learn @GoldenStack/TroveREADME
trove
Trove is a loot table library for Minestom. It implements nearly every feature from vanilla Minecraft.
Install
To install, simply add the library via Maven Central:
repositories {
mavenCentral()
}
dependencies {
implementation 'net.minestom:minestom-snapshots:<version>'
implementation 'net.goldenstack:trove:<version>'
}
Make sure to include Minestom, or else Trove won't work.
Usage
Setup
Trove is designed to be extremely simple to use.
To obtain a Map<NamespaceID, LootTable>, simply call Trove.readTables(Path.of("path_to_loot_tables")). Trove will
automatically parse out the loot table hierarchy and include it in the table IDs.
Generation
Loot generation is very simple as well. Calling LootTable#generate(LootContext) returns a list of items.
If you're implementing block drops, just call LootTable#blockDrop(LootContext, Instance, Point). If you're
implementing entity drops, call LootTable#drop(LootContext, Instance, Point).
TODO: Improve the docs. For now, this might address some concerns:
https://gist.github.com/RealMangorage/d295f217a988dc0f9a996064e54ce6c8
Completeness
TODO
Contributing
Feel free to open a PR or an issue.
Before starting large PRs, make sure to check that it's actually needed; try asking a maintainer.
By contributing to the Trove project you agree that the entirety of your contribution is licensed identically to Trove, which is currently under the MIT license.
License
This project is licensed under the MIT license.
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
