Package net.createmod.catnip.render
Class DefaultSuperByteBuffer
java.lang.Object
net.createmod.catnip.render.DefaultSuperByteBuffer
- All Implemented Interfaces:
com.jozufozu.flywheel.util.transform.Rotate<SuperByteBuffer>,com.jozufozu.flywheel.util.transform.Scale<SuperByteBuffer>,com.jozufozu.flywheel.util.transform.Transform<SuperByteBuffer>,com.jozufozu.flywheel.util.transform.Translate<SuperByteBuffer>,com.jozufozu.flywheel.util.transform.TStack<SuperByteBuffer>,SuperByteBuffer
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.createmod.catnip.render.SuperByteBuffer
SuperByteBuffer.SpriteShiftFunc -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected booleanprotected intprotected booleanprotected intprotected booleanprotected booleanprotected booleanprotected com.mojang.math.Matrix4fprotected intprotected intprotected intprotected booleanprotected SuperByteBuffer.SpriteShiftFuncprotected ByteBufferprotected com.mojang.blaze3d.vertex.PoseStackprotected booleanprotected static final it.unimi.dsi.fastutil.longs.Long2IntMap -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSuperByteBuffer(com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer renderedBuffer) -
Method Summary
Modifier and TypeMethodDescriptioncolor(int color) color(int r, int g, int b, int a) Transforms normals not only by the local matrix stack, but also by the passed matrix stack.protected bytegetA(int index) protected bytegetB(int index) protected intgetBufferPosition(int vertexIndex) protected bytegetG(int index) protected intgetLight(int index) protected bytegetNX(int index) protected bytegetNY(int index) protected bytegetNZ(int index) protected bytegetR(int index) com.mojang.blaze3d.vertex.PoseStackprotected floatgetU(int index) protected floatgetV(int index) protected floatgetX(int index) protected floatgetY(int index) protected floatgetZ(int index) Use max light from calculated light (world light or custom light) and vertex light for the final light value.booleanisEmpty()light()Indicate that this buffer should look up the light coordinates in the current level.light(int packedLight) light(com.mojang.math.Matrix4f lightTransform) Indicate that this buffer should look up the light coordinates in the current level.mulNormal(com.mojang.math.Matrix3f normal) mulPose(com.mojang.math.Matrix4f pose) multiply(com.mojang.math.Quaternion quaternion) overlay()overlay(int overlay) popPose()pushPose()voidrenderInto(com.mojang.blaze3d.vertex.PoseStack ms, com.mojang.blaze3d.vertex.VertexConsumer consumer) reset()scale(float factorX, float factorY, float factorZ) shiftUV(SpriteShiftEntry entry) shiftUVScrolling(SpriteShiftEntry entry, float scrollU, float scrollV) shiftUVtoSheet(SpriteShiftEntry entry, float uTarget, float vTarget, int sheetSize) transform(com.mojang.blaze3d.vertex.PoseStack ms) translate(double x, double y, double z) protected intMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.util.transform.Rotate
multiply, multiplyRadians, rotate, rotate, rotateToFace, rotateX, rotateXRadians, rotateY, rotateYRadians, rotateZ, rotateZRadiansMethods inherited from interface com.jozufozu.flywheel.util.transform.Scale
scaleMethods inherited from interface net.createmod.catnip.render.SuperByteBuffer
color, delete, forEntityRender, light, rotate, shiftUVScrollingMethods inherited from interface com.jozufozu.flywheel.util.transform.Transform
rotateCentered, rotateCentered, transformMethods inherited from interface com.jozufozu.flywheel.util.transform.Translate
centre, nudge, translate, translate, translate, translateAll, translateBack, translateBack, translateBack, translateX, translateY, translateZ, unCentre
-
Field Details
-
template
-
formatSize
protected int formatSize -
transforms
protected com.mojang.blaze3d.vertex.PoseStack transforms -
shouldColor
protected boolean shouldColor -
r
protected int r -
g
protected int g -
b
protected int b -
a
protected int a -
disableDiffuse
protected boolean disableDiffuse -
spriteShiftFunc
-
hasOverlay
protected boolean hasOverlay -
overlay
protected int overlay -
useWorldLight
protected boolean useWorldLight -
lightTransform
@Nullable protected com.mojang.math.Matrix4f lightTransform -
hasCustomLight
protected boolean hasCustomLight -
packedLightCoordinates
protected int packedLightCoordinates -
hybridLight
protected boolean hybridLight -
fullNormalTransform
protected boolean fullNormalTransform -
WORLD_LIGHT_CACHE
protected static final it.unimi.dsi.fastutil.longs.Long2IntMap WORLD_LIGHT_CACHE
-
-
Constructor Details
-
DefaultSuperByteBuffer
public DefaultSuperByteBuffer(com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer renderedBuffer)
-
-
Method Details
-
renderInto
public void renderInto(com.mojang.blaze3d.vertex.PoseStack ms, com.mojang.blaze3d.vertex.VertexConsumer consumer) - Specified by:
renderIntoin interfaceSuperByteBuffer
-
reset
- Specified by:
resetin interfaceSuperByteBuffer
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSuperByteBuffer
-
getTransforms
public com.mojang.blaze3d.vertex.PoseStack getTransforms()- Specified by:
getTransformsin interfaceSuperByteBuffer
-
translate
- Specified by:
translatein interfacecom.jozufozu.flywheel.util.transform.Translate<SuperByteBuffer>
-
multiply
- Specified by:
multiplyin interfacecom.jozufozu.flywheel.util.transform.Rotate<SuperByteBuffer>
-
scale
- Specified by:
scalein interfacecom.jozufozu.flywheel.util.transform.Scale<SuperByteBuffer>
-
pushPose
- Specified by:
pushPosein interfacecom.jozufozu.flywheel.util.transform.TStack<SuperByteBuffer>
-
popPose
- Specified by:
popPosein interfacecom.jozufozu.flywheel.util.transform.TStack<SuperByteBuffer>
-
mulPose
- Specified by:
mulPosein interfacecom.jozufozu.flywheel.util.transform.Transform<SuperByteBuffer>
-
mulNormal
- Specified by:
mulNormalin interfacecom.jozufozu.flywheel.util.transform.Transform<SuperByteBuffer>
-
transform
- Specified by:
transformin interfacecom.jozufozu.flywheel.util.transform.Transform<SuperByteBuffer>
-
color
- Specified by:
colorin interfaceSuperByteBuffer
-
color
- Specified by:
colorin interfaceSuperByteBuffer
-
disableDiffuse
- Specified by:
disableDiffusein interfaceSuperByteBuffer
-
shiftUV
- Specified by:
shiftUVin interfaceSuperByteBuffer
-
shiftUVScrolling
public DefaultSuperByteBuffer shiftUVScrolling(SpriteShiftEntry entry, float scrollU, float scrollV) - Specified by:
shiftUVScrollingin interfaceSuperByteBuffer
-
shiftUVtoSheet
public DefaultSuperByteBuffer shiftUVtoSheet(SpriteShiftEntry entry, float uTarget, float vTarget, int sheetSize) - Specified by:
shiftUVtoSheetin interfaceSuperByteBuffer
-
overlay
- Specified by:
overlayin interfaceSuperByteBuffer
-
overlay
- Specified by:
overlayin interfaceSuperByteBuffer
-
light
Description copied from interface:SuperByteBufferIndicate that this buffer should look up the light coordinates in the current level.- Specified by:
lightin interfaceSuperByteBuffer
-
light
Description copied from interface:SuperByteBufferIndicate that this buffer should look up the light coordinates in the current level. Light Positions will be transformed by the passed Matrix before the lookup.- Specified by:
lightin interfaceSuperByteBuffer
-
light
- Specified by:
lightin interfaceSuperByteBuffer
-
hybridLight
Description copied from interface:SuperByteBufferUse max light from calculated light (world light or custom light) and vertex light for the final light value. Ineffective if no other light method was called.- Specified by:
hybridLightin interfaceSuperByteBuffer
-
fullNormalTransform
Description copied from interface:SuperByteBufferTransforms normals not only by the local matrix stack, but also by the passed matrix stack.- Specified by:
fullNormalTransformin interfaceSuperByteBuffer
-
vertexCount
protected int vertexCount() -
getBufferPosition
protected int getBufferPosition(int vertexIndex) -
getX
protected float getX(int index) -
getY
protected float getY(int index) -
getZ
protected float getZ(int index) -
getR
protected byte getR(int index) -
getG
protected byte getG(int index) -
getB
protected byte getB(int index) -
getA
protected byte getA(int index) -
getU
protected float getU(int index) -
getV
protected float getV(int index) -
getLight
protected int getLight(int index) -
getNX
protected byte getNX(int index) -
getNY
protected byte getNY(int index) -
getNZ
protected byte getNZ(int index)
-