Skip to content

Commit

Permalink
fix client world leak (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <[email protected]>
  • Loading branch information
Glease and Dream-Master authored Jan 10, 2025
1 parent 009cd22 commit 013a8fd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ public void render(double x, double y, double z, int rotation, @Nullable String
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);

synchronized (this.item) {
this.item.setWorld(Minecraft.getMinecraft().theWorld);
RENDER.doRender(this.item, 0.0, 0.0, 0.0, 0.0f, 0.0f);
try {
this.item.setWorld(Minecraft.getMinecraft().theWorld);
RENDER.doRender(this.item, 0.0, 0.0, 0.0, 0.0f, 0.0f);
} finally {
this.item.setWorld(null);
}
}

GL11.glPopAttrib();
Expand Down

0 comments on commit 013a8fd

Please sign in to comment.