Interface Colored

All Superinterfaces:
net.minecraft.item.ItemConvertible, Registered, Registered.Client
All Known Implementing Classes:
CloudyArmorItem, CloudyItem, DyeableCloudyArmorItem

public interface Colored extends Registered.Client, net.minecraft.item.ItemConvertible
Implements common functionality for all colored item extensions.

By itself, this interface only handles registration on the client environment. It should usually be used in tandem with the Custom interface, which handles common registration as well.

Since:
1.7.0
  • Method Details

    • getStackColor

      int getStackColor(net.minecraft.item.ItemStack stack, int layerIndex)
      Returns the color for the given stack at the provided layer index.
      Parameters:
      stack - The item stack.
      layerIndex - The index of the color layer.
      Returns:
      The layer's color.
      Since:
      2.0.0
    • registerClient

      default void registerClient()
      Description copied from interface: Registered.Client
      Registers this value on the client environment.

      The contained code will only ever run on the game client. If you only want the server or want both, see its sister interfaces.

      Specified by:
      registerClient in interface Registered.Client
      See Also: