类 CCRenderState
java.lang.Object
committee.nova.mods.avaritia.api.client.render.CCRenderState
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.
-
字段概要
字段修饰符和类型字段说明intAn override for the alpha colour component.intThe base color, multiplied by theColourAttributefrom the bound model if present otherwise used as-is.intintfinal VertexAttribute<int[]>booleanintcom.mojang.blaze3d.vertex.VertexFormatintfinal VertexAttribute<LC[]>final VertexAttribute<int[]>A standardLightMatrixinstance to be shared on this pipeline.final Vector3final VertexAttribute<Vector3[]>intcom.mojang.blaze3d.vertex.VertexConsumerintfinal VertexAttribute<int[]>net.minecraft.client.renderer.texture.TextureAtlasSpritefinal Vertex5int -
方法概要
修饰符和类型方法说明voidbind(com.mojang.blaze3d.vertex.BufferBuilder r) Bind thisCCRenderStateinstance to the givenBufferBuilder.voidbind(com.mojang.blaze3d.vertex.VertexConsumer consumer, com.mojang.blaze3d.vertex.VertexFormat format) voidbind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source) Bind thisCCRenderStateto the givenRenderType.voidbind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source, com.mojang.blaze3d.vertex.PoseStack mStack) Bind thisCCRenderStateto the givenRenderType, applying the given MatrixStack.voidbind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource getter, Matrix4 mat) Bind thisCCRenderStateto the givenRenderType, applying the given MatrixStack.voidbindModel(IVertexSource model) voiddraw()com.mojang.blaze3d.vertex.VertexConsumercom.mojang.blaze3d.vertex.VertexFormatstatic CCRenderStateinstance()voidpreRenderWorld(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos) voidrender()voidrender(IVertexOperation... ops) voidreset()Resets thisCCRenderStateinstance's pipeline and internal state.voidvoidsetBrightness(net.minecraft.world.entity.Entity entity, float frameDelta) voidsetBrightness(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos) voidvoidsetFluidColour(net.minecraftforge.fluids.FluidStack fluidStack) voidsetFluidColour(net.minecraftforge.fluids.FluidStack fluidStack, int alpha) voidsetModel(IVertexSource source) voidsetModel(IVertexSource source, int start, int end) voidsetPipeline(IVertexOperation... ops) voidsetPipeline(IVertexSource model, int start, int end, IVertexOperation... ops) voidsetVertexRange(int start, int end) com.mojang.blaze3d.vertex.BufferBuilderstartDrawing(com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) Bind thisCCRenderStateinstance to theTesselatorbuffer and prepare to start drawing vertices for the givenmodeandVertexFormat.com.mojang.blaze3d.vertex.BufferBuilderstartDrawing(com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format, com.mojang.blaze3d.vertex.BufferBuilder buffer) Bind thisCCRenderStateinstance to the givenBufferBuilderand prepare to start drawing vertices for the givenmodeandVertexFormat.void
-
字段详细资料
-
normalAttrib
-
colourAttrib
-
lightingAttrib
-
sideAttrib
-
lightCoordAttrib
-
vert
-
normal
-
model
-
firstVertexIndex
public int firstVertexIndex -
lastVertexIndex
public int lastVertexIndex -
vertexIndex
public int vertexIndex -
pipeline
-
r
public com.mojang.blaze3d.vertex.VertexConsumer r -
fmt
public com.mojang.blaze3d.vertex.VertexFormat fmt -
cFmt
-
baseColour
public int baseColourThe base color, multiplied by theColourAttributefrom the bound model if present otherwise used as-is. -
alphaOverride
public int alphaOverrideAn override for the alpha colour component. -
computeLighting
public boolean computeLighting -
lightMatrix
A standardLightMatrixinstance to be shared on this pipeline. -
colour
public int colour -
brightness
public int brightness -
overlay
public int overlay -
side
public int side -
lc
-
sprite
public net.minecraft.client.renderer.texture.TextureAtlasSprite sprite
-
-
方法详细资料
-
instance
-
startDrawing
public com.mojang.blaze3d.vertex.BufferBuilder startDrawing(com.mojang.blaze3d.vertex.VertexFormat.Mode mode, com.mojang.blaze3d.vertex.VertexFormat format) Bind thisCCRenderStateinstance to theTesselatorbuffer and prepare to start drawing vertices for the givenmodeandVertexFormat.- 参数:
mode- The Draw Mode.format- TheVertexFormat.- 返回:
- The
BufferBuilderinstance fromTesselator.
-
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 thisCCRenderStateinstance to the givenBufferBuilderand prepare to start drawing vertices for the givenmodeandVertexFormat.- 参数:
mode- The Draw Mode.format- TheVertexFormat.buffer- TheBufferBuilderto bind to.- 返回:
- The same
BufferBuilderthat was passed in.
-
bind
public void bind(com.mojang.blaze3d.vertex.BufferBuilder r) Bind thisCCRenderStateinstance to the givenBufferBuilder.- 参数:
r- TheBufferBuilder.
-
bind
public void bind(com.mojang.blaze3d.vertex.VertexConsumer consumer, com.mojang.blaze3d.vertex.VertexFormat format) - 参数:
consumer- TheVertexConsumerto bind to.format- TheVertexFormatof theVertexConsumer.
-
bind
public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source) Bind thisCCRenderStateto the givenRenderType.- 参数:
renderType- TheRenderTypeto bind to.source- TheMultiBufferSourceinstance.
-
bind
public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource source, com.mojang.blaze3d.vertex.PoseStack mStack) Bind thisCCRenderStateto the givenRenderType, applying the given MatrixStack.- 参数:
renderType- TheRenderTypeto bind to.source- TheMultiBufferSourceinstance.mStack- ThePoseStackto apply.
-
bind
public void bind(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.MultiBufferSource getter, Matrix4 mat) Bind thisCCRenderStateto the givenRenderType, applying the given MatrixStack.- 参数:
renderType- TheRenderTypeto bind to.getter- TheMultiBufferSourceinstance.mat- TheMatrix4to apply.
-
reset
public void reset()Resets thisCCRenderStateinstance's pipeline and internal state. -
preRenderWorld
public void preRenderWorld(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos) -
setPipeline
-
setPipeline
-
bindModel
-
setModel
-
setModel
-
setVertexRange
public void setVertexRange(int start, int end) -
render
-
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
-
setColour
-
getConsumer
public com.mojang.blaze3d.vertex.VertexConsumer getConsumer() -
getVertexFormat
public com.mojang.blaze3d.vertex.VertexFormat getVertexFormat() -
draw
public void draw()
-