Package net.createmod.catnip.render
Class DefaultSuperByteBuffer
java.lang.Object
net.createmod.catnip.render.DefaultSuperByteBuffer
- All Implemented Interfaces:
dev.engine_room.flywheel.lib.transform.Affine<SuperByteBuffer>,dev.engine_room.flywheel.lib.transform.Rotate<SuperByteBuffer>,dev.engine_room.flywheel.lib.transform.Scale<SuperByteBuffer>,dev.engine_room.flywheel.lib.transform.Transform<SuperByteBuffer>,dev.engine_room.flywheel.lib.transform.TransformStack<SuperByteBuffer>,dev.engine_room.flywheel.lib.transform.Translate<SuperByteBuffer>,SuperByteBuffer
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.createmod.catnip.render.SuperByteBuffer
SuperByteBuffer.ShiftOutput, SuperByteBuffer.SpriteShiftFunc -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected booleanprotected intprotected booleanprotected intprotected booleanprotected booleanprotected booleanprotected org.joml.Matrix4fprotected intprotected intprotected intprotected booleanprotected SuperByteBuffer.SpriteShiftFuncprotected ByteBufferprotected com.mojang.blaze3d.vertex.PoseStackprotected booleanprotected static final it.unimi.dsi.fastutil.longs.Long2IntMapFields inherited from interface dev.engine_room.flywheel.lib.transform.Translate
CENTER -
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) 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) booleanisEmpty()light(int packedLight) mulNormal(org.joml.Matrix3fc matrix3fc) mulPose(org.joml.Matrix4fc matrix4fc) overlay(int overlay) popPose()pushPose()voidrenderInto(com.mojang.blaze3d.vertex.PoseStack ms, com.mojang.blaze3d.vertex.VertexConsumer consumer) reset()rotate(org.joml.Quaternionfc quaternionfc) 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) translate(float x, float y, float z) useLevelLight(net.minecraft.world.level.BlockAndTintGetter level) Indicate that this buffer should look up the light coordinates in the level.useLevelLight(net.minecraft.world.level.BlockAndTintGetter level, org.joml.Matrix4f lightTransform) Indicate that this buffer should look up the light coordinates in the level.protected intMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.engine_room.flywheel.lib.transform.Affine
rotateAround, rotateAround, rotateCentered, rotateCentered, rotateCentered, rotateCenteredMethods inherited from interface dev.engine_room.flywheel.lib.transform.Rotate
rotate, rotate, rotate, rotate, rotate, rotateDegrees, rotateDegrees, rotateDegrees, rotateDegrees, rotateToFace, rotateX, rotateXDegrees, rotateY, rotateYDegrees, rotateZ, rotateZDegrees, selfMethods inherited from interface dev.engine_room.flywheel.lib.transform.Scale
scale, scale, scaleX, scaleY, scaleZMethods inherited from interface net.createmod.catnip.render.SuperByteBuffer
color, delete, rotate, shiftUVScrollingMethods inherited from interface dev.engine_room.flywheel.lib.transform.Transform
transform, transformMethods inherited from interface dev.engine_room.flywheel.lib.transform.Translate
center, nudge, translate, translate, translate, translate, translate, translateBack, translateBack, translateBack, translateBack, translateBack, translateBack, translateBack, translateX, translateY, translateZ, uncenter
-
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 org.joml.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 interfacedev.engine_room.flywheel.lib.transform.Translate<SuperByteBuffer>
-
translate
- Specified by:
translatein interfacedev.engine_room.flywheel.lib.transform.Translate<SuperByteBuffer>
-
scale
- Specified by:
scalein interfacedev.engine_room.flywheel.lib.transform.Scale<SuperByteBuffer>
-
pushPose
- Specified by:
pushPosein interfacedev.engine_room.flywheel.lib.transform.TransformStack<SuperByteBuffer>
-
popPose
- Specified by:
popPosein interfacedev.engine_room.flywheel.lib.transform.TransformStack<SuperByteBuffer>
-
mulPose
- Specified by:
mulPosein interfacedev.engine_room.flywheel.lib.transform.Transform<SuperByteBuffer>
-
mulNormal
- Specified by:
mulNormalin interfacedev.engine_room.flywheel.lib.transform.Transform<SuperByteBuffer>
-
transform
- Specified by:
transformin interfacedev.engine_room.flywheel.lib.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
-
useLevelLight
Description copied from interface:SuperByteBufferIndicate that this buffer should look up the light coordinates in the level.- Specified by:
useLevelLightin interfaceSuperByteBuffer
-
useLevelLight
public DefaultSuperByteBuffer useLevelLight(net.minecraft.world.level.BlockAndTintGetter level, org.joml.Matrix4f lightTransform) Description copied from interface:SuperByteBufferIndicate that this buffer should look up the light coordinates in the level. Light Positions will be transformed by the passed Matrix before the lookup.- Specified by:
useLevelLightin interfaceSuperByteBuffer
-
light
- Specified by:
lightin 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) -
rotate
- Specified by:
rotatein interfacedev.engine_room.flywheel.lib.transform.Rotate<SuperByteBuffer>
-