Skip to content

Commit

Permalink
Avoid item render leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Sep 2, 2023
1 parent 941e71c commit b00491a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ public class MixinEntityRenderDispatcher {
PoseStack poseStack, MultiBufferSource bufferSource, int light,
CallbackInfo ci) {
CapturedRenderingState.INSTANCE.setCurrentEntity(0);
CapturedRenderingState.INSTANCE.setCurrentRenderedItem(0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void changeId(ItemStack pItemRenderer0, ItemTransforms.TransformType pIt
}
}

@Inject(method = "render", at = @At(value = "TAIL"))
@Inject(method = "render", at = @At(value = "RETURN"))
private void changeId2(CallbackInfo ci) {
CapturedRenderingState.INSTANCE.setCurrentRenderedItem(0);
CapturedRenderingState.INSTANCE.setCurrentBlockEntity(previousBeValue);
Expand Down

0 comments on commit b00491a

Please sign in to comment.