From 4d4973faf5d8968eabaafeed6bd6d7ed9ecefc45 Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Tue, 1 Mar 2022 22:00:44 -0500 Subject: [PATCH] Fix fluids not rendering on fabulous graphics (SlimeKnights/TinkersConstruct#4745) --- .../mantle/client/render/MantleRenderTypes.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/slimeknights/mantle/client/render/MantleRenderTypes.java b/src/main/java/slimeknights/mantle/client/render/MantleRenderTypes.java index 172bd5c8..a9ca8b22 100644 --- a/src/main/java/slimeknights/mantle/client/render/MantleRenderTypes.java +++ b/src/main/java/slimeknights/mantle/client/render/MantleRenderTypes.java @@ -7,10 +7,15 @@ import com.mojang.blaze3d.vertex.VertexFormatElement; import net.minecraft.client.renderer.RenderStateShard; import net.minecraft.client.renderer.RenderType; -import net.minecraft.world.inventory.InventoryMenu; import slimeknights.mantle.Mantle; -import static com.mojang.blaze3d.vertex.DefaultVertexFormat.*; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_COLOR; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_NORMAL; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_PADDING; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_POSITION; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_UV0; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_UV1; +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.ELEMENT_UV2; /** * Class for render types defined by Mantle @@ -26,14 +31,12 @@ private MantleRenderTypes(String name, VertexFormat format, Mode mode, int buffe */ public static final RenderType FLUID = create( Mantle.modId + ":block_render_type", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, VertexFormat.Mode.QUADS, 256, true, true, - RenderType.CompositeState.builder().setTextureState(new RenderStateShard.TextureStateShard(InventoryMenu.BLOCK_ATLAS, false, false)) - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_TRANSLUCENT_SHADER) + DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, VertexFormat.Mode.QUADS, 256, false, true, + RenderType.CompositeState.builder() .setLightmapState(LIGHTMAP) + .setShaderState(POSITION_COLOR_TEX_LIGHTMAP_SHADER) .setTextureState(BLOCK_SHEET_MIPPED) .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setOutputState(TRANSLUCENT_TARGET) .createCompositeState(false)); /**