diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-11-20 15:15:43 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-11-20 15:15:43 +0800 |
| commit | a1f486b018b67cfad27c5848ec653a781026bdce (patch) | |
| tree | 205e0d349638a3128ccf4f3ca496f805044761e5 /runtime/src/main/java | |
| parent | 6b5aaeb240eb10d7d9d918955701637157152871 (diff) | |
| download | RoughlyEnoughItems-a1f486b018b67cfad27c5848ec653a781026bdce.tar.gz RoughlyEnoughItems-a1f486b018b67cfad27c5848ec653a781026bdce.tar.bz2 RoughlyEnoughItems-a1f486b018b67cfad27c5848ec653a781026bdce.zip | |
Round Dispose here bounds
Diffstat (limited to 'runtime/src/main/java')
| -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 e5188c4b8..97fd1dccf 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 @@ -252,7 +252,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; @@ -286,9 +286,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); |
