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

public final class FaceBuilder extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private int
     
    private @Nullable net.minecraft.core.Direction
     
    private boolean
     
    private com.mojang.math.Quadrant
     
    private int
     
    private @Nullable net.minecraft.client.data.models.model.TextureSlot
     
    private int
     
    private net.minecraft.client.renderer.block.model.BlockElementFace.UVs
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ambientOcclusion(boolean ambientOcclusion)
    Set the ambient occlusion of the face.
    (package private) net.minecraft.client.renderer.block.model.BlockElementFace
     
    color(int color)
    Sets the color of the face.
    (package private) FaceBuilder
     
    cullface(@Nullable net.minecraft.core.Direction dir)
    Sets which direction should cull this face when fully occluded, or null to never cull.
    emissivity(int blockLight, int skyLight)
    Set the block and sky light of the face (0-15).
    rotation(com.mojang.math.Quadrant rot)
    Set the texture rotation for the current face.
    texture(net.minecraft.client.data.models.model.TextureSlot texture)
    Set the texture for the current face.
    tintindex(int index)
    Sets the color index used when attempting to tint this face.
    uvs(float u1, float v1, float u2, float v2)
    Sets the texture uv mapping for this face.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cullface

      @Nullable private @Nullable net.minecraft.core.Direction cullface
    • tintindex

      private int tintindex
    • texture

      @Nullable private @Nullable net.minecraft.client.data.models.model.TextureSlot texture
    • uvs

      @Nullable private net.minecraft.client.renderer.block.model.BlockElementFace.UVs uvs
    • rotation

      private com.mojang.math.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 net.minecraft.core.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(net.minecraft.client.data.models.model.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(com.mojang.math.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

      net.minecraft.client.renderer.block.model.BlockElementFace build()
    • copy

      FaceBuilder copy()