Skip to content

Commit

Permalink
Fix fluids not rendering on fabulous graphics (SlimeKnights/TinkersCo…
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Mar 2, 2022
1 parent 497be64 commit 4d4973f
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));

/**
Expand Down

0 comments on commit 4d4973f

Please sign in to comment.