java.lang.Object
java.lang.Enum<BlendMode>
net.fabricmc.fabric.api.renderer.v1.material.BlendMode
All Implemented Interfaces:
Serializable, Comparable<BlendMode>, java.lang.constant.Constable

public enum BlendMode extends Enum<BlendMode>
Defines how sprite pixels will be blended with the scene.
  • Enum Constant Details

    • DEFAULT

      public static final BlendMode DEFAULT
      Emulate blending behavior of BlockRenderLayer associated with the block.
    • SOLID

      public static final BlendMode SOLID
      Fully opaque with depth test, no blending. Used for most normal blocks.
    • CUTOUT_MIPPED

      public static final BlendMode CUTOUT_MIPPED
      Pixels with alpha > 0.5 are rendered as if SOLID. Other pixels are not rendered. Texture mip-map enabled. Used for leaves.
    • CUTOUT

      public static final BlendMode CUTOUT
      Pixels with alpha > 0.5 are rendered as if SOLID. Other pixels are not rendered. Texture mip-map disabled. Used for iron bars, glass and other cutout sprites with hard edges.
    • TRANSLUCENT

      public static final BlendMode TRANSLUCENT
      Pixels are blended with the background according to alpha color values. Some performance cost, use in moderation. Texture mip-map enabled. Used for stained glass.
  • Field Details

    • blockRenderLayer

      public final net.minecraft.client.render.RenderLayer blockRenderLayer
  • Method Details

    • values

      public static BlendMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BlendMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromRenderLayer

      public static BlendMode fromRenderLayer(net.minecraft.client.render.RenderLayer renderLayer)