aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
diff options
context:
space:
mode:
authorDanielshe <shekwancheung0528@gmail.com>2019-11-08 17:32:35 +0800
committerDanielshe <shekwancheung0528@gmail.com>2019-11-08 17:32:35 +0800
commit3bcd325f2d9454753990c2ea2b06b7947c118d3d (patch)
tree4a2a3b9ac555f3d38c7c582fcffab68281fa1836 /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
parent0cc101e5cb57e62674abe421983444f79ea630fc (diff)
downloadRoughlyEnoughItems-3bcd325f2d9454753990c2ea2b06b7947c118d3d.tar.gz
RoughlyEnoughItems-3bcd325f2d9454753990c2ea2b06b7947c118d3d.tar.bz2
RoughlyEnoughItems-3bcd325f2d9454753990c2ea2b06b7947c118d3d.zip
19w45a
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
index 98968340b..773374bf5 100644
--- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
@@ -377,7 +377,7 @@ public class VillagerRecipeViewingScreen extends Screen {
double maxScroll = getMaxScrollPosition();
if (maxScroll > scrollListBounds.height - 2) {
Tessellator tessellator = Tessellator.getInstance();
- BufferBuilder buffer = tessellator.getBufferBuilder();
+ BufferBuilder buffer = tessellator.getBuffer();
int height = (int) (((scrollListBounds.height - 2) * (scrollListBounds.height - 2)) / this.getMaxScrollPosition());
height = MathHelper.clamp(height, 32, scrollListBounds.height - 2 - 8);
height -= Math.min((scroll < 0 ? (int) -scroll : scroll > getMaxScroll() ? (int) scroll - getMaxScroll() : 0), height * .95);
@@ -392,10 +392,10 @@ public class VillagerRecipeViewingScreen extends Screen {
RenderSystem.shadeModel(7425);
buffer.begin(7, VertexFormats.POSITION_COLOR);
float b = ScreenHelper.isDarkModeEnabled() ? 0.37f : 1f;
- buffer.vertex(scrollbarPositionMinX, minY + height, 1000D).color(b, b, b, scrollBarAlpha).next();
- buffer.vertex(scrollbarPositionMaxX, minY + height, 1000D).color(b, b, b, scrollBarAlpha).next();
- buffer.vertex(scrollbarPositionMaxX, minY, 1000D).color(b, b, b, scrollBarAlpha).next();
- buffer.vertex(scrollbarPositionMinX, minY, 1000D).color(b, b, b, scrollBarAlpha).next();
+ buffer.vertex(scrollbarPositionMinX, minY + height, 800).color(b, b, b, scrollBarAlpha).next();
+ buffer.vertex(scrollbarPositionMaxX, minY + height, 800).color(b, b, b, scrollBarAlpha).next();
+ buffer.vertex(scrollbarPositionMaxX, minY, 800).color(b, b, b, scrollBarAlpha).next();
+ buffer.vertex(scrollbarPositionMinX, minY, 800).color(b, b, b, scrollBarAlpha).next();
tessellator.draw();
RenderSystem.shadeModel(7424);
RenderSystem.disableBlend();