Skip to content

Commit

Permalink
Fix display entry matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Jul 16, 2023
1 parent bc51741 commit e6ead22
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import me.shedaniel.rei.api.client.gui.widgets.*;
import me.shedaniel.rei.api.client.registry.category.CategoryRegistry;
import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
import me.shedaniel.rei.api.client.util.MatrixUtils;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.Display;
import me.shedaniel.rei.impl.client.ClientHelperImpl;
Expand Down Expand Up @@ -214,7 +215,8 @@ public void render(PoseStack poses, int mouseX, int mouseY, float delta) {
poses.translate(xOffset(), yOffset(), 0);
poses.scale(xScale(), yScale(), 1.0F);

result.renderer.render(poses, mouseX, mouseY, delta, widgets.get(), getBounds(), display);
Rectangle transformedBounds = MatrixUtils.transform(MatrixUtils.inverse(poses.last().pose()), getBounds());
result.renderer.render(poses, mouseX, mouseY, delta, widgets.get(), transformedBounds, display);
poses.popPose();
}
} else {
Expand Down

0 comments on commit e6ead22

Please sign in to comment.