Danielshe 5 年之前
父節點
當前提交
e51bfea46f

+ 5 - 5
gradle.properties

@@ -1,10 +1,10 @@
 mod_version=3.2.6-unstable
-minecraft_version=19w44a
-yarn_version=19w44a+build.3
+minecraft_version=19w45a
+yarn_version=19w45a+build.2
 fabricloader_version=0.6.3+build.168
 jankson_version=1.1.0
 cloth_events_version=1.0.1-unstable.201911010702
-cloth_config_version=2.3.3-unstable.201911020734
-modmenu_version=1.7.13-unstable.19w38b+build.5
-fabric_api=0.4.9+build.258-1.15
+cloth_config_version=2.4-unstable.201911031154
+modmenu_version=1.7.15-unstable.19w42a+build.11
+fabric_api=0.4.10+build.259-1.15
 

+ 6 - 6
src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java

@@ -27,8 +27,8 @@ import net.minecraft.client.gui.Element;
 import net.minecraft.client.gui.screen.Screen;
 import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen;
 import net.minecraft.client.render.GuiLighting;
-import net.minecraft.client.render.LayeredVertexConsumerStorage;
 import net.minecraft.client.render.Tessellator;
+import net.minecraft.client.render.VertexConsumerProvider;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.util.Window;
@@ -63,7 +63,7 @@ public class ContainerScreenOverlay extends Widget {
     public final TriConsumer<Integer, Integer, Float> renderTooltipCallback = (x, y, aFloat) -> {
         RenderSystem.disableRescaleNormal();
         RenderSystem.disableDepthTest();
-        setBlitOffset(1000);
+        setBlitOffset(999);
         this.fillGradient(x - 3, y - 4, x + tooltipWidth + 3, y - 3, -267386864, -267386864);
         this.fillGradient(x - 3, y + tooltipHeight + 3, x + tooltipWidth + 3, y + tooltipHeight + 4, -267386864, -267386864);
         this.fillGradient(x - 3, y - 3, x + tooltipWidth + 3, y + tooltipHeight + 3, -267386864, -267386864);
@@ -75,14 +75,14 @@ public class ContainerScreenOverlay extends Widget {
         this.fillGradient(x - 3, y + tooltipHeight + 2, x + tooltipWidth + 3, y + tooltipHeight + 3, 1344798847, 1344798847);
         int currentY = y;
         MatrixStack matrixStack_1 = new MatrixStack();
-        LayeredVertexConsumerStorage.Drawer drawer = LayeredVertexConsumerStorage.makeDrawer(Tessellator.getInstance().getBufferBuilder());
+        VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer());
         matrixStack_1.translate(0.0D, 0.0D, getBlitOffset());
-        Matrix4f matrix4f_1 = matrixStack_1.peek();
+        Matrix4f matrix4f_1 = matrixStack_1.method_23760().method_23761();
         for (int lineIndex = 0; lineIndex < tooltipLines.size(); lineIndex++) {
-            font.method_22942(tooltipLines.get(lineIndex), (float) x, (float) currentY, -1, true, matrix4f_1, drawer, false, 0, 15728880);
+            font.draw(tooltipLines.get(lineIndex), x, currentY, -1, true, matrix4f_1, immediate, false, 0, 15728880);
             currentY += lineIndex == 0 ? 12 : 10;
         }
-        drawer.draw();
+        immediate.draw();
         setBlitOffset(0);
         RenderSystem.enableDepthTest();
         RenderSystem.enableRescaleNormal();

+ 5 - 5
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();

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/widget/EntryListWidget.java

@@ -310,7 +310,7 @@ public class EntryListWidget extends Widget {
             double height = getMaxScroll();
             if (height > rectangle.height) {
                 Tessellator tessellator = Tessellator.getInstance();
-                BufferBuilder buffer = tessellator.getBufferBuilder();
+                BufferBuilder buffer = tessellator.getBuffer();
                 double maxScroll = height;
                 int scrollBarHeight = MathHelper.floor((rectangle.height) * (rectangle.height) / maxScroll);
                 scrollBarHeight = MathHelper.clamp(scrollBarHeight, 32, rectangle.height - 8);

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java

@@ -478,7 +478,7 @@ public class TextFieldWidget extends WidgetWithBounds implements Tickable {
         }
         
         Tessellator tessellator_1 = Tessellator.getInstance();
-        BufferBuilder bufferBuilder_1 = tessellator_1.getBufferBuilder();
+        BufferBuilder bufferBuilder_1 = tessellator_1.getBuffer();
         RenderSystem.color4f(0.0F, 0.0F, 255.0F, 255.0F);
         RenderSystem.disableTexture();
         RenderSystem.enableColorLogicOp();

+ 2 - 2
src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java

@@ -176,8 +176,8 @@ public class FluidEntryStack extends AbstractEntryStack {
                 MinecraftClient.getInstance().getTextureManager().bindTexture(SpriteAtlasTexture.BLOCK_ATLAS_TEX);
                 GuiLighting.disable();
                 Tessellator tess = Tessellator.getInstance();
-                BufferBuilder bb = tess.getBufferBuilder();
-                bb.begin(7, VertexFormats.POSITION_UV_COLOR);
+                BufferBuilder bb = tess.getBuffer();
+                bb.begin(7, VertexFormats.POSITION_TEXTURE_COLOR);
                 bb.vertex(bounds.getMaxX(), bounds.y, getZ()).texture(sprite.getMaxU(), sprite.getMinV()).color(r, g, b, a).next();
                 bb.vertex(bounds.x, bounds.y, getZ()).texture(sprite.getMinU(), sprite.getMinV()).color(r, g, b, a).next();
                 bb.vertex(bounds.x, bounds.getMaxY(), getZ()).texture(sprite.getMinU(), sprite.getMaxV()).color(r, g, b, a).next();