Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5ab17d2
bump version
OffsetMonkey538 Nov 16, 2025
1253a4a
[DOCS] Update Astro and Starlight
OffsetMonkey538 Nov 18, 2025
1796963
[DOCS] Clarify
OffsetMonkey538 Nov 18, 2025
958562d
Add docs stuff to main gitignore
OffsetMonkey538 Nov 19, 2025
7bdcd40
Remove docs
OffsetMonkey538 Nov 19, 2025
0d9f33b
Don't touch Minecraft in actions and predicates
OffsetMonkey538 Dec 6, 2025
5cd8bf8
Gradle setup for multi loader and version project
OffsetMonkey538 Dec 7, 2025
58ad99e
Github actions
OffsetMonkey538 Dec 7, 2025
8814ae4
Fix run config names
OffsetMonkey538 Dec 8, 2025
907190a
Move everything to fabric.v1215 package
OffsetMonkey538 Dec 8, 2025
bcc3f9c
Actually how bout we move everything to fabric package in fabric module
OffsetMonkey538 Dec 11, 2025
dd32784
stuff
OffsetMonkey538 Dec 11, 2025
6b7317c
Add monkeylib, use monkeylib
OffsetMonkey538 Dec 13, 2025
aad8f9b
Add monkeylib, use monkeylib
OffsetMonkey538 Dec 13, 2025
ed0ce6f
Move wrappers to common, use service loading
OffsetMonkey538 Dec 13, 2025
02fd5b7
Move resource and thus most logic to common
OffsetMonkey538 Dec 14, 2025
9164020
Fix crash when running export command
OffsetMonkey538 Dec 14, 2025
9e6f137
support everything from 1.20.5 to 1.21.idk something pretty new ish p…
OffsetMonkey538 Dec 14, 2025
ce937ee
Make runClient and runServer not run on fabric common, enable devauth
OffsetMonkey538 Dec 15, 2025
0baa9f4
Depend on monkeylib release
OffsetMonkey538 Dec 15, 2025
c437ec1
Depend on monkeylib release... I guess i accidentally bumped it twice…
OffsetMonkey538 Dec 15, 2025
0a7b9cb
fix modrinth task
OffsetMonkey538 Dec 15, 2025
4312e78
Update monkeylib
OffsetMonkey538 Dec 26, 2025
d962129
bump version
OffsetMonkey538 Dec 26, 2025
de05876
Update readme
OffsetMonkey538 Dec 27, 2025
08a532b
remap to mojmap
OffsetMonkey538 Dec 28, 2025
c76fbb5
duplicate fabric subproject to modded subproject
OffsetMonkey538 Dec 28, 2025
4a19a34
it's a whole newwww buildsystem, a whole new wonderful build.gradle w…
OffsetMonkey538 Dec 30, 2025
f474bfd
Move common code to its own package
OffsetMonkey538 Dec 30, 2025
f215be1
update github workflows
OffsetMonkey538 Dec 30, 2025
78d7418
fixx all the service files intellij messed up when refactoring common…
OffsetMonkey538 Dec 30, 2025
b4bf204
fix using incorrect loot table id for fabric 1.21 datagen
OffsetMonkey538 Dec 30, 2025
2b9da45
unnecesddarty
OffsetMonkey538 Dec 30, 2025
a3c4860
Depend on newer monkeylib
OffsetMonkey538 Jan 1, 2026
3b27bbe
update buildscripts
OffsetMonkey538 Jan 1, 2026
f0a462c
neoforge
OffsetMonkey538 Jan 2, 2026
2aadcbb
add broken 1.20.1 project to modded
OffsetMonkey538 Jan 2, 2026
5f5ee6b
update publish workflow
OffsetMonkey538 Jan 2, 2026
458f06c
Remove <1.21 support for neoforge
OffsetMonkey538 Jan 4, 2026
66caeb6
move neoforge and fabric subprojects into loader folder
OffsetMonkey538 Jan 4, 2026
eae03c6
make the mixin that literally starts the mod doing anything work on n…
OffsetMonkey538 Jan 4, 2026
12ca360
rename 1.20.1 package form v1205 to v1201
OffsetMonkey538 Jan 5, 2026
a916ea4
move codec providers to version specific modded
OffsetMonkey538 Jan 5, 2026
e8621b2
fix loot modifier action and predicate codec providers on 1.20.1
OffsetMonkey538 Jan 5, 2026
19026d3
add GSONCodec for 1.20.1
OffsetMonkey538 Jan 5, 2026
bf6f213
use PlatformMain.allOf not Util.allOf
OffsetMonkey538 Jan 5, 2026
b1c4322
Create PredicateUtils
OffsetMonkey538 Jan 5, 2026
d3d7751
he is 100% on this
OffsetMonkey538 Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
path: ./loader/*/*/build/libs/
60 changes: 0 additions & 60 deletions .github/workflows/docs.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ jobs:
with:
cache-read-only: false

- name: Store short commit hash
run: echo "short_commit_hash=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"

- name: Generate resources with Gradle
run: ./gradlew runDatagenClient
env:
IS_RELEASE: true
DISABLE_PROPERTIES_UPDATE: true
VERSION_SUFFIX: ""


- name: Build with Gradle
run: ./gradlew build
env:
IS_RELEASE: true
DISABLE_PROPERTIES_UPDATE: true
VERSION_SUFFIX: ""

- name: Upload to Modrinth
run: ./gradlew modrinth
env:
IS_RELEASE: true
DISABLE_PROPERTIES_UPDATE: true
VERSION_SUFFIX: ""
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
VERSION_NAME: ${{ github.event.release.name }}
VERSION_IS_PRERELEASE: ${{ github.event.release.prerelease }}
Expand All @@ -57,10 +57,11 @@ jobs:
env:
IS_RELEASE: true
DISABLE_PROPERTIES_UPDATE: true
VERSION_SUFFIX: ""
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

- name: Upload to GitHub
uses: softprops/action-gh-release@v2
with:
files: build/libs/*.jar
files: ./loader/*/*/build/libs/
29 changes: 27 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,36 @@ out
classes

# Fabric
run/
src/main/generated/*
**/run/
**/src/main/generated/*

# Java
hs_err_*.log
replay_*.log
*.hprof
*.jfr



## Docs related stuff. Docs is on separate branch, but checking out between them will leave docs stuff at the root level
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
40 changes: 0 additions & 40 deletions Dockerfile

This file was deleted.

93 changes: 20 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,31 @@
# Loot Table Modifier
[![discord-singular](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-singular_vector.svg)](https://discord.offsetmonkey538.top/)
[![modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/mod/loot-table-modifier)
[![Chat with me on Discord](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-singular_vector.svg)](https://discord.offsetmonkey538.top/)
[![Available on Modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/mod/loot-table-modifier)
[![Requires MonkeyLib538](https://raw.githubusercontent.com/OffsetMods538/MonkeyLib538/master/images/requires_monkeylib538.png)](https://modrinth.com/mod/monkeylib538)
[![Requires Fabric API](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/requires/fabric-api_vector.svg)](https://modrinth.com/mod/fabric-api)

todo: good readme for alpha version
## Why?
Vanilla datapacks can only replace existing loot tables, which is not good for being compatible with other datapacks that also try to replace the same table.
This mod fixes that by implementing a system of *loot modifiers*, which do just that, modify loot (tables)!

Allows datapacks to modify loot tables, instead of just overwriting them.
Version 2 of the mod is currently in alpha. v2 adds more ways to modify loot tables than just adding to them
v2 will be backwards-compatible with v1 modifiers, so no need to worry about them breaking.
Unlike some other mods (*ahem* KubeJS) which work by running code at runtime to intercept and change drops, Loot Table Modifier modifies the loot tables as they're loaded from datapacks.
This means that the mod will only hurt performance during data loading, but has no performance impact during gameplay!¹

If you want to use v1, then see the original description below.
If you do decide to try out the alpha version of v2 (please do), then please go ahead and read the documentation [here](https://loot-table-modifier.docs.offsetmonkey538.top/) and if you encounter any problems, have suggestions for new actions/predicates or just want to say literally anything about the mod, please please please join my discord and tell me about it. I want to make this as good as I can and any sort of feedback really helps.
###### ¹ Except when you make zombies drop a bajillion stacks of diamonds or something crazy like that, but that's really not the mod's fault 😅

## Usage
### Players
This mod does *nothing* when installed on its own. There needs to be some sort of datapack present that uses loot modifiers.
If you are using some mod or datapack which depends on Loot Table Modifier, just download the latest version for the Minecraft version you use from the versions page and add it to your mods folder.

List of projects utilizing Loot Table Modifier:
- I don't know of any yet 😅 Please do hit me up on discord or something if you wanna add your project here :D

## Original Description
### Mod, Modpack or Datapack developers
Follow the documentation available [here](https://loot-table-modifier.docs.offsetmonkey538.top).

Allows datapacks (and thus mods as well) to add to loot tables, instead of just overwriting them.
This mod is allowed to be used in Modrinth modpacks.
I don't think I can legally prevent redistribution when using the MIT license, but I'd really appreciate if the mod wouldn't be redistributed as part of a modpack on other platforms.

This mod shouldn't impact performance while playing the game, but only when datapacks are reloading (joining a world, starting a server, `/reload` command, whatever else).
Performance impact during pack reloading varies depending on the datapacks.
The mod writes how long applying modifiers took in the console.

Also provides a datagen provider for creating loot table modifiers in mods.

A modifier json file includes two components:
1. `"modifies"` - string or array, which defines the loot tables to modify. For example `"minecraft:entities/creeper"` or `"minecraft:chests/abandoned_mineshaft"`
2. `"pools"` - array of loot pools. This works exactly the same as the `"pools"` in a vanilla loot table, thus you can generate a loot table online with a tool like [misode.github.io](https://misode.github.io/loot-table/) and copy over the `"pools"` from the generated json. (I may fork it and add a generator for specifically this mod in the future™)
An example json file:
```json5
// example_pack/data/example/loot-table-modifier/loot_modifier/drop_tnt.json
{
// Can also be a single identifier without an array
// "modifies": "minecraft:entities/creeper",
"modifies": [
"minecraft:entities/creeper",
"minecraft:entities/zombie"
],
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 0.0
},
"function": "minecraft:set_count"
}
],
"name": "minecraft:tnt"
}
],
"rolls": 1.0
}
]
}
```

Depend on inside mod:
```groovy
repositories {
// ...
maven {
name = "OffsetMods538"
url = "https://maven.offsetmonkey538.top/releases"
content {
includeGroup "top.offsetmonkey538.loottablemodifier"
}
}
}


dependencies {
// ...
modImplementation "top.offsetmonkey538.loottablemodifier:loot-table-modifier:1.0.1+1.21.1"
}
```
###### This mod collects anonymous usage statistics, read more about what's collected [here](https://github.com/OffsetMods538/MonkeyMetrics-Server). No personal data is collected. This can be disabled by modifying the config at `config/monkeylib538/telemetry.json` or by running the `/monkeylib538 telemetry set isEnabled false` command.
Loading
Loading