Class QuadCornerKicker
java.lang.Object
codechicken.lib.model.pipeline.QuadTransformer
codechicken.lib.model.pipeline.transformers.QuadCornerKicker
- All Implemented Interfaces:
IVertexConsumer,IPipelineConsumer
This transformer is a little complicated.
Basically a Facade / Cover can use this to 'kick' the edges
in of quads to fix z-Fighting in the corners.
Use it by specifying the side of the block you are on,
the bitmask for where the other Facades / Cover's are,
the bounding box of the facade, NOT the hole piece,
and the thickness of your Facade / Cover, this is used
as the kick amount.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IPipelineElementFactory<QuadCornerKicker> static int[][]Fields inherited from class codechicken.lib.model.pipeline.QuadTransformer
consumer, format, quad -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBox(net.minecraft.world.phys.AABB box) Sets the bounding box of the Facade / Cover, this should be the full box, not just a piece of the hole's 'ring'.voidsetFacadeMask(int mask) Sets the bitmask of Facades / Covers in the blockspace.voidsetSide(int side) Set's the side this Facade / Cover is attached to.voidsetThickness(double thickness) Sets the amount to kick the vertex in by, this is your facades thickness.booleanCalled to transform the vertices.Methods inherited from class codechicken.lib.model.pipeline.QuadTransformer
epsComp, getVertexFormat, onFull, put, put, reset, setApplyDiffuseLighting, setInputQuad, setParent, setQuadOrientation, setQuadTint, setTextureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codechicken.lib.model.IVertexConsumer
put
-
Field Details
-
FACTORY
-
horizonals
public static int[][] horizonals
-
-
Method Details
-
setSide
public void setSide(int side) Set's the side this Facade / Cover is attached to.- Parameters:
side- The side.
-
setFacadeMask
public void setFacadeMask(int mask) Sets the bitmask of Facades / Covers in the blockspace. This is as simple as,mask = (1 << side)- Parameters:
mask- The mask.
-
setBox
public void setBox(net.minecraft.world.phys.AABB box) Sets the bounding box of the Facade / Cover, this should be the full box, not just a piece of the hole's 'ring'.- Parameters:
box- The BoundingBox.
-
setThickness
public void setThickness(double thickness) Sets the amount to kick the vertex in by, this is your facades thickness.- Parameters:
thickness- The thickness.
-
transform
public boolean transform()Description copied from class:QuadTransformerCalled to transform the vertices.- Specified by:
transformin classQuadTransformer- Returns:
- If the transformer should pipe the quad.
-