类 CCRenderState

java.lang.Object
committee.nova.mods.avaritia.api.client.render.CCRenderState

public class CCRenderState extends Object
The core of the CodeChickenLib render system. Where possible assign a local var of CCRenderState to avoid millions of calls to instance(); Uses a ThreadLocal system to assign each thread their own CCRenderState so we can use it in Multithreaded chunk batching. TODO, proper piping of BakedQuads and CCBakedQuads.
  • 字段详细资料

    • normalAttrib

      public final VertexAttribute<Vector3[]> normalAttrib
    • colourAttrib

      public final VertexAttribute<int[]> colourAttrib
    • lightingAttrib

      public final VertexAttribute<int[]> lightingAttrib
    • sideAttrib

      public final VertexAttribute<int[]> sideAttrib
    • lightCoordAttrib

      public final VertexAttribute<LC[]> lightCoordAttrib
    • vert

      public final Vertex5 vert
    • normal

      public final Vector3 normal
    • model

      public IVertexSource model
    • firstVertexIndex

      public int firstVertexIndex
    • lastVertexIndex

      public int lastVertexIndex
    • vertexIndex

      public int vertexIndex
    • pipeline

      public CCRenderPipeline pipeline
    • r

      public com.mojang.blaze3d.vertex.VertexConsumer r
    • fmt

      public com.mojang.blaze3d.vertex.VertexFormat fmt
    • cFmt

      public CachedFormat cFmt
    • baseColour

      public int baseColour
      The base color, multiplied by the ColourAttribute from the bound model if present otherwise used as-is.
    • alphaOverride

      public int alphaOverride
      An override for the alpha colour component.
    • computeLighting

      public boolean computeLighting
      Lets the LightMatrix or PlanarLightModel know if this CCRenderState should compute lighting.
    • lightMatrix

      public LightMatrix lightMatrix
      A standard LightMatrix instance to be shared on this pipeline.
    • colour

      public int colour
    • brightness

      public int brightness
    • overlay

      public int overlay
    • side

      public int side
    • lc

      public LC lc
    • sprite

      public net.minecraft.client.renderer.texture.TextureAtlasSprite sprite
  • 方法详细资料

    • instance

      public static CCRenderState instance()
    • startDrawing

      public com.mojang.blaze3d.vertex.BufferBuilder startDrawing(com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format)
      Bind this CCRenderState instance to the Tesselator buffer and prepare to start drawing vertices for the given mode and VertexFormat.
      参数:
      mode - The Draw Mode.
      format - The VertexFormat.
      返回:
      The BufferBuilder instance from Tesselator.
    • startDrawing

      public com.mojang.blaze3d.vertex.BufferBuilder startDrawing(com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format, com.mojang.blaze3d.vertex.BufferBuilder buffer)
      Bind this CCRenderState instance to the given BufferBuilder and prepare to start drawing vertices for the given mode and VertexFormat.
      参数:
      mode - The Draw Mode.
      format - The VertexFormat.
      buffer - The BufferBuilder to bind to.
      返回:
      The same BufferBuilder that was passed in.
    • bind

      public void bind(com.mojang.blaze3d.vertex.BufferBuilder r)
      Bind this CCRenderState instance to the given BufferBuilder.
      参数:
      r - The BufferBuilder.
    • bind

      public void bind(com.mojang.blaze3d.vertex.VertexConsumer consumer, com.mojang.blaze3d.vertex.VertexFormat format)
      Bind this CCRenderState to the given VertexConsumer and VertexFormat.
      参数:
      consumer - The VertexConsumer to bind to.
      format - The VertexFormat of the VertexConsumer.
    • bind

      public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source)
      Bind this CCRenderState to the given RenderType.
      参数:
      renderType - The RenderType to bind to.
      source - The MultiBufferSource instance.
    • bind

      public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source, com.mojang.blaze3d.vertex.PoseStack mStack)
      Bind this CCRenderState to the given RenderType, applying the given MatrixStack.
      参数:
      renderType - The RenderType to bind to.
      source - The MultiBufferSource instance.
      mStack - The PoseStack to apply.
    • bind

      public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource getter, Matrix4 mat)
      Bind this CCRenderState to the given RenderType, applying the given MatrixStack.
      参数:
      renderType - The RenderType to bind to.
      getter - The MultiBufferSource instance.
      mat - The Matrix4 to apply.
    • reset

      public void reset()
      Resets this CCRenderState instance's pipeline and internal state.
    • preRenderWorld

      public void preRenderWorld(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos)
    • setPipeline

      public void setPipeline(IVertexOperation... ops)
    • setPipeline

      public void setPipeline(IVertexSource model, int start, int end, IVertexOperation... ops)
    • bindModel

      public void bindModel(IVertexSource model)
    • setModel

      public void setModel(IVertexSource source)
    • setModel

      public void setModel(IVertexSource source, int start, int end)
    • setVertexRange

      public void setVertexRange(int start, int end)
    • render

      public void render(IVertexOperation... ops)
    • render

      public void render()
    • runPipeline

      public void runPipeline()
    • writeVert

      public void writeVert()
    • setBrightness

      public void setBrightness(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos)
    • setBrightness

      public void setBrightness(net.minecraft.world.entity.Entity entity, float frameDelta)
    • setFluidColour

      public void setFluidColour(net.minecraftforge.fluids.FluidStack fluidStack)
    • setFluidColour

      public void setFluidColour(net.minecraftforge.fluids.FluidStack fluidStack, int alpha)
    • getColour

      public ColorRGBA getColour()
    • setColour

      public void setColour(Color color)
    • getConsumer

      public com.mojang.blaze3d.vertex.VertexConsumer getConsumer()
    • getVertexFormat

      public com.mojang.blaze3d.vertex.VertexFormat getVertexFormat()
    • draw

      public void draw()