code cleanup

This commit is contained in:
FalsePattern committed 2022-07-31 20:41:56 +02:00
1 parent eaec528f5d
commit 316908baae
76 files changed
+691 -622

No files matched your search

@@ -51,9 +51,9 @@ public class SimpleToast implements IToast {
private float currentProgress;
@StableAPI(since = "0.10.0")
public SimpleToast(@NonNull ToastBG background, @Nullable ToastIcon icon,
IChatComponent titleComponent, @Nullable IChatComponent subtitleComponent,
boolean drawProgressBar, long timeout) {
public SimpleToast(@NonNull ToastBG background,
@Nullable ToastIcon icon, IChatComponent titleComponent,
@Nullable IChatComponent subtitleComponent, boolean drawProgressBar, long timeout) {
this.background = background;
this.icon = icon;
this.title = titleComponent.getFormattedText();
@@ -83,7 +83,8 @@ public class SimpleToast implements IToast {
if (hasProgressBar) {
val bgWidth = background.getIcon().getIconWidth();
Gui.drawRect(3, bgHeight - 4, bgWidth - 3, bgHeight - 3, 0xFFFFFFFF);
float f = (float) MathUtil.clampedLerp(displayedProgress, currentProgress, (float) (delta - lastDelta) / 100.0F);
float f = (float) MathUtil.clampedLerp(displayedProgress, currentProgress,
(float) (delta - lastDelta) / 100.0F);
int i;
if (currentProgress >= displayedProgress) {