Skip to content

Fix imported Java Entity models exploding when there are multiple nested groups#3627

Open
JoshieGemFinder wants to merge 1 commit into
JannisX11:patchfrom
JoshieGemFinder:fix-modded-entity-imports
Open

Fix imported Java Entity models exploding when there are multiple nested groups#3627
JoshieGemFinder wants to merge 1 commit into
JannisX11:patchfrom
JoshieGemFinder:fix-modded-entity-imports

Conversation

@JoshieGemFinder

@JoshieGemFinder JoshieGemFinder commented Jul 2, 2026

Copy link
Copy Markdown

Problem

This pull request fixes a particularly annoying bug that would cause imported modded entity models to "explode" when there were multiple nested model groups.

This was because Blockbench would re-apply the model group transformations multiple times, causing part offsets to get way too big the further they got from the origin.

Additionally, the model would be exploded in different ways depending on the order that cubes, origin points, and children were assigned.

Example

Here's an example of what used to happen to such a model when imported from Java code (pictured model code here; viewed from the default "Isometric Right" angle):
weeping-blue-exploded

Solution

This pull request fixes that by breaking up the import into two parts:

  1. Import all of the groups / cubes relative only to themselves / their groups (i.e. ignore parent transforms for now).
  2. After all groups and cubes are imported, only then apply parent transforms.

This fixes the issue with transforms being applied multiple times during an import, as they are all processed at once in the second step.

Example

Here's that same model from earlier, imported with the new code from this pull request (same model as before; viewed from the default "Isometric Right" angle):
weeping-blue-unexploded

This is what the model was originally intended to look like (and how it renders in-game), showing that the bug has been fixed.

Note

Admittedly, I haven't tested this with many models from other versions, but I do not believe it should cause any issues.

@JoshieGemFinder
JoshieGemFinder changed the base branch from master to patch July 5, 2026 05:47
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