Class QuadCornerKicker

java.lang.Object
codechicken.lib.model.pipeline.QuadTransformer
codechicken.lib.model.pipeline.transformers.QuadCornerKicker
All Implemented Interfaces:
IVertexConsumer, IPipelineConsumer

public class QuadCornerKicker extends QuadTransformer
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.
  • Field Details

  • 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: QuadTransformer
      Called to transform the vertices.
      Specified by:
      transform in class QuadTransformer
      Returns:
      If the transformer should pipe the quad.