Class Quad

java.lang.Object
codechicken.lib.model.Quad

public class Quad extends Object
A mutable BakedQuad.
  • Field Details

    • vertices

      public Quad.Vertex[] vertices
    • tintIndex

      public int tintIndex
    • direction

      @Nullable public @Nullable net.minecraft.core.Direction direction
    • sprite

      @Nullable public @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite sprite
    • shade

      public boolean shade
    • lightEmission

      public int lightEmission
    • ambientOcclusion

      public boolean ambientOcclusion
  • Constructor Details

    • Quad

      public Quad()
    • Quad

      public Quad(Quad quad)
    • Quad

      public Quad(net.minecraft.client.renderer.block.model.BakedQuad quad)
  • Method Details

    • resetInterp

      public InterpHelper resetInterp(InterpHelper helper, int s)
      Used to reset the interpolation values inside the provided helper.
      Parameters:
      helper - The helper.
      s - The axis. side >> 1;
      Returns:
      The same helper.
    • clamp

      public void clamp(net.minecraft.world.phys.AABB bb)
      Clamps the Quad inside the box.
      Parameters:
      bb - The box.
    • clamp

      public void clamp(Cuboid6 cuboid)
      Clamps the Quad inside the box.
      Parameters:
      cuboid - The box.
    • reinterpolate

      public void reinterpolate(InterpHelper interp)
      Reinterpolate this quad's UV's and Colors after some transformation.

      You will have needed to use resetInterp(InterpHelper, int) prior to your transformations in order for reinterpolation to not output garbage.

      Parameters:
      interp - Your interpolation helper.
    • calculateOrientation

      public void calculateOrientation(boolean setNormal)
      Re-calculates the Orientation of this quad, optionally the normal vector.
      Parameters:
      setNormal - If the normal vector should be updated.
    • copy

      public Quad copy()
      Returns:
      A complete copy of this quad.
    • copyFrom

      public Quad copyFrom(net.minecraft.client.renderer.block.model.BakedQuad quad)
      Copy the data from the given BakedQuad into this quad.
      Parameters:
      quad - The BakedQuad to copy from.
      Returns:
      This quad.
    • copyFrom

      public Quad copyFrom(Quad quad)
      Copies the data from the given Quad into this quad.
      Parameters:
      quad - The Quad to copy from.
      Returns:
      This quad.
    • bake

      public net.minecraft.client.renderer.block.model.BakedQuad bake()
      Bakes this Quad to a BakedQuad.
      Returns:
      The BakedQuad.