java.lang.Object
net.neoforged.neoforge.client.model.generators.template.FaceBuilder

public final class FaceBuilder extends Object
  • Field Details

    • cullface

      @Nullable private @Nullable Direction cullface
    • tintindex

      private int tintindex
    • texture

      @Nullable private @Nullable TextureSlot texture
    • uvs

      @Nullable private BlockElementFace.UVs uvs
    • rotation

      private Quadrant rotation
    • color

      private int color
    • blockLight

      private int blockLight
    • skyLight

      private int skyLight
    • hasAmbientOcclusion

      private boolean hasAmbientOcclusion
  • Constructor Details

    • FaceBuilder

      public FaceBuilder()
  • Method Details

    • cullface

      public FaceBuilder cullface(@Nullable @Nullable Direction dir)
      Sets which direction should cull this face when fully occluded, or null to never cull.
    • tintindex

      public FaceBuilder tintindex(int index)
      Sets the color index used when attempting to tint this face.
    • texture

      public FaceBuilder texture(TextureSlot texture)
      Set the texture for the current face.
      Parameters:
      texture - the texture
      Returns:
      this builder
      Throws:
      NullPointerException - if texture is null
    • uvs

      public FaceBuilder uvs(float u1, float v1, float u2, float v2)
      Sets the texture uv mapping for this face.
    • rotation

      public FaceBuilder rotation(Quadrant rot)
      Set the texture rotation for the current face.
      Parameters:
      rot - the rotation
      Returns:
      this builder
      Throws:
      NullPointerException - if rot is null
    • emissivity

      public FaceBuilder emissivity(int blockLight, int skyLight)
      Set the block and sky light of the face (0-15). Traditional "emissivity" values set both of these to the same value.
      Parameters:
      blockLight - the block light
      skyLight - the sky light
      Returns:
      this builder
    • color

      public FaceBuilder color(int color)
      Sets the color of the face.
      Parameters:
      color - the color in ARGB format.
      Returns:
      this builder
    • ambientOcclusion

      public FaceBuilder ambientOcclusion(boolean ambientOcclusion)
      Set the ambient occlusion of the face.
      Parameters:
      ambientOcclusion - the ambient occlusion
      Returns:
      this builder
    • build

    • copy

      FaceBuilder copy()