Skip to content

Support generating custom block mappings and resourcepacks#29

Merged
eclipseisoffline merged 20 commits into
GeyserMC:masterfrom
eclipseisoffline:custom-block-mappings
May 17, 2026
Merged

Support generating custom block mappings and resourcepacks#29
eclipseisoffline merged 20 commits into
GeyserMC:masterfrom
eclipseisoffline:custom-block-mappings

Conversation

@eclipseisoffline
Copy link
Copy Markdown
Member

@eclipseisoffline eclipseisoffline commented May 16, 2026

This PR adds support for generating custom block mappings and bedrock resourcepacks to Rainbow. This is currently a work-in-progress and highly experimental: there are still many bugs and TO-DOs. However, the PR has already seem some success with basic custom blocks from Polymer mods like Polymer Patch Bundle (with blockus) and TSA: Concrete!.

The PR adds records and codecs for Geyser's block mappings, which are used by the new BedrockBlockMapper utility class, which turns overridden block states into a Geyser block mapping and appropriate geometry and texture files in the exported resourcepack. ModelTextures has been abstracted to support both textures for blocks and items: it has been split into ModelTextures and the new ItemModelTextures interface (which holds most of the old ModelTextures code for handling item textures). A new implementation of ModelTextures, BlockModelTextures, has been created for handling block textures.

Users will be able to manually map a single block state, by passing it as argument to a command or by passing the position of such a block state in the world to a command. Rainbow will also provide an option to automatically detect all custom block state overrides in the currently loaded resourcepacks (may not be perfect).

A short list of TO-DOs for this PR:

  • Making sure block and item textures don't overlap.
  • Proper UX (improve commands).
  • Proper usage/mapping of the built-in full_block and cross geometry files.
    • full_block
    • cross
  • Properly note statistics in report.txt (will require a rework of how statistics are passed through the code).
  • Proper handling of some errors that can occur during converting (such as no materials).
  • Improve automatic detection of custom block state overrides.
  • Datagen module (needs a simple AssetResolver fix)

@eclipseisoffline eclipseisoffline merged commit e91ad98 into GeyserMC:master May 17, 2026
1 check passed
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