Skip to content

Commit

Permalink
reduce toast translate for potential conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisuika committed Oct 26, 2024
1 parent 562285e commit 027c5a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public abstract static class Pre {
/**
* Moves the {@code toasts} if {@link Element.TOASTS} is enabled.
*/
@Inject(method = "render", at = @At("HEAD"))
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;pushPose()V"))
private void startToastsTranslate(GuiGraphics guiGraphics, int i, CallbackInfo ci) {
Translate.start(guiGraphics.pose(), Element.TOASTS);
}

@Inject(method = "render", at = @At("TAIL"))
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;popPose()V", shift = At.Shift.AFTER))
private void endToastsTranslate(GuiGraphics guiGraphics, int i, CallbackInfo ci) {
Translate.end(guiGraphics.pose());
}
Expand Down

0 comments on commit 027c5a0

Please sign in to comment.