Skip to content

Commit

Permalink
Now not displaying entity when it is unloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
CTAK-CO6AK authored Mar 4, 2021
1 parent 0e3e1a1 commit 90a4612
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/net/torocraft/torohealth/display/Hud.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ private void draw(MatrixStack matrix, float x, float y, float scale) {
if (entity == null) {
return;
}


if(client.world.getEntityById(entity.getEntityId()) != entity) {
setEntityWork(null);
return;
}

matrix.push();
matrix.scale(scale, scale, scale);
matrix.translate(x - 10, y - 10, 0);
Expand Down

0 comments on commit 90a4612

Please sign in to comment.