类 QuadLighter

java.lang.Object
net.minecraftforge.client.model.lighting.QuadLighter
直接已知子类:
FlatQuadLighter, SmoothQuadLighter

public abstract class QuadLighter extends Object
Base class for all quad lighting providers.

Contains all the shared elements needed for BakedQuad processing and defers lighting logic to inheritors.

另请参阅:
  • 字段详细资料

    • WHITE

      private static final float[] WHITE
    • colors

      private final BlockColors colors
    • currentHash

      private int currentHash
    • level

      private BlockAndTintGetter level
    • pos

      private BlockPos pos
    • state

      private BlockState state
    • cachedTintIndex

      private int cachedTintIndex
    • cachedTintColor

      private final float[] cachedTintColor
    • brightness

      private final float[] brightness
    • lightmap

      private final int[] lightmap
    • positions

      private final float[][] positions
    • normals

      private final byte[][] normals
    • packedLightmaps

      private final int[] packedLightmaps
  • 构造器详细资料

    • QuadLighter

      protected QuadLighter(BlockColors colors)
  • 方法详细资料

    • computeLightingAt

      protected abstract void computeLightingAt(BlockAndTintGetter level, BlockPos pos, BlockState state)
    • calculateBrightness

      protected abstract float calculateBrightness(float[] position)
    • calculateLightmap

      protected abstract int calculateLightmap(float[] position, byte[] normal)
    • setup

      public final void setup(BlockAndTintGetter level, BlockPos pos, BlockState state)
    • reset

      public final void reset()
    • process

      public final void process(VertexConsumer consumer, PoseStack.Pose pose, BakedQuad quad, int overlay)
    • getColorFast

      private float[] getColorFast(int tintIndex)
    • calculateShade

      public static float calculateShade(float normalX, float normalY, float normalZ, boolean constantAmbientLight)