Skip to content

Commit

Permalink
🐛 Remove unnecessary cast from byte -> int -> byte (Sub-issue of #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-MX committed Dec 4, 2024
1 parent 4607de8 commit a465bb8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class SneakTrait extends Trait {
private int previousBackgroundOpacity = 0;
private int previousTextOpacity = Byte.MAX_VALUE;
private byte previousTextOpacity = Byte.MAX_VALUE;
private boolean isSneaking = false;

public void manuallyUpdateSneakingOpacity() {
Expand All @@ -32,7 +32,7 @@ public void updateSneak(boolean sneaking) {
meta.setTextOpacity((byte) getCustomOpacity());
} else {
meta.setBackgroundColor(color.setAlpha(previousBackgroundOpacity).asARGB());
meta.setTextOpacity((byte) previousTextOpacity);
meta.setTextOpacity(previousTextOpacity);
}
});
getTag().getPassenger().refresh();
Expand Down

0 comments on commit a465bb8

Please sign in to comment.