Skip to content

Add chest predictor module#6115

Draft
xpple wants to merge 3 commits intoMeteorDevelopment:masterfrom
xpple:chest-predictor
Draft

Add chest predictor module#6115
xpple wants to merge 3 commits intoMeteorDevelopment:masterfrom
xpple:chest-predictor

Conversation

@xpple
Copy link

@xpple xpple commented Feb 5, 2026

Type of change

  • Bug fix
  • New feature

Description

This PR adds a chest predictor module that predicts chest loot based on the seed. It works by detecting structure pieces using their NBT file, and from there inferring the loot table of the chest. The loot seed can be calculated using just the world seed and the chest's coordinates. To emulate the loot generation, I used Cubiomes. It would be better if one were able to use Minecraft's own loot generation code, but it's highly coupled with server side logic, making it infeasible to use (for example every loot function has ServerLevel as parameter).

The PR is a draft for at least three reasons:

  1. The Java bindings for Cubiomes require JDK 22+, which is not yet available in Minecraft 1.21.11.
  2. There are some jigsaw structures that aren't supported yet.
  3. There are some piece detection bugs still.

I mostly wanted to get the PR out there for perhaps an initial review.

Related issues

None.

How Has This Been Tested?

https://streamable.com/8ragqe

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant