Package codechicken.lib.model
Class QuadCornerKicker
java.lang.Object
codechicken.lib.model.QuadTransformer
codechicken.lib.model.QuadCornerKicker
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
Fields -
Constructor Summary
Constructors -
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.booleanTransform the quad.Methods inherited from class codechicken.lib.model.QuadTransformer
beforeTransform, epsComp, transform, transform
-
Field Details
-
horizonals
public static int[][] horizonals
-
-
Constructor Details
-
QuadCornerKicker
public QuadCornerKicker()
-
-
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
Description copied from class:QuadTransformerTransform the quad.- Specified by:
transformin classQuadTransformer- Returns:
- If transformation should continue.
If
false, the quad will be discarded.
-