diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-11-20 15:15:43 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-11-20 18:30:36 +0800 |
| commit | b92284180f3c58361180f9e5fb1062ba5560466e (patch) | |
| tree | da8465a6a4547ec5618939b00c9e3f99fb0d214d /runtime/src/main/java/me | |
| parent | 6070b21d0e843aecaa032f473dc293382f860f0a (diff) | |
| download | RoughlyEnoughItems-b92284180f3c58361180f9e5fb1062ba5560466e.tar.gz RoughlyEnoughItems-b92284180f3c58361180f9e5fb1062ba5560466e.tar.bz2 RoughlyEnoughItems-b92284180f3c58361180f9e5fb1062ba5560466e.zip | |
Round Dispose here bounds
Diffstat (limited to 'runtime/src/main/java/me')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java index aec7a5950..95c050e76 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java @@ -255,7 +255,7 @@ public class FavoritesListWidget extends WidgetWithBounds implements DraggableSt this.trashBoundsHeight.update(delta); double trashBoundsHeight = this.trashBoundsHeight.value(); - if (trashBoundsHeight > 0) { + if (Math.round(trashBoundsHeight) > 0) { double trashBoundsHeightTarget = Math.min(150D, fullBounds.height * 0.15D); double progress = Math.pow(Mth.clamp(trashBoundsHeight / trashBoundsHeightTarget, 0, 1), 7); int y = this.fullBounds.getMaxY() - 4 - favoritePanel.getBounds().height; @@ -289,9 +289,9 @@ public class FavoritesListWidget extends WidgetWithBounds implements DraggableSt systemHeight += 4; } if (favoritePanel.getBounds().height > 20) - region.getBounds().setBounds(this.fullBounds.x, this.fullBounds.y + systemHeight, this.fullBounds.width, this.fullBounds.height - systemHeight - (this.fullBounds.getMaxY() - this.favoritePanel.bounds.y) - 4 - (trashBoundsHeight <= 0 ? 0 : trashBoundsHeight)); + region.getBounds().setBounds(this.fullBounds.x, this.fullBounds.y + systemHeight, this.fullBounds.width, this.fullBounds.height - systemHeight - (this.fullBounds.getMaxY() - this.favoritePanel.bounds.y) - 4 - (Math.round(trashBoundsHeight) <= 0 ? 0 : trashBoundsHeight)); else - region.getBounds().setBounds(this.fullBounds.x, this.fullBounds.y + systemHeight, this.fullBounds.width, this.fullBounds.height - systemHeight - (trashBoundsHeight <= 0 ? 0 : trashBoundsHeight + 24)); + region.getBounds().setBounds(this.fullBounds.x, this.fullBounds.y + systemHeight, this.fullBounds.width, this.fullBounds.height - systemHeight - (Math.round(trashBoundsHeight) <= 0 ? 0 : trashBoundsHeight + 24)); systemRegion.render(matrices, mouseX, mouseY, delta); region.render(matrices, mouseX, mouseY, delta); renderAddFavorite(matrices, mouseX, mouseY, delta); |
