From 3bcd325f2d9454753990c2ea2b06b7947c118d3d Mon Sep 17 00:00:00 2001 From: Danielshe Date: Fri, 8 Nov 2019 17:32:35 +0800 Subject: 19w45a --- .../java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java') 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(); -- cgit