Interface IMCItemProvider

All Known Subinterfaces:
IBlock, IItem
All Known Implementing Classes:
Armor, Block, Dimension, Fluid, Item, LivingEntity, MusicDisc, Plant, Tool

public interface IMCItemProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    default ImageIcon
    getIconForMCItem(Workspace workspace, String suffix)
    This method determines what icon should be used for a custom MCItem, according to its eventual suffix
    This method determines what MCItems are provided by this generatable element
  • Method Details

    • providedMCItems

      List<MCItem> providedMCItems()
      This method determines what MCItems are provided by this generatable element

      WARNING: Calls to this method are generally not thread safe. Implementations can call MCItem.Custom::new that calls getBlockIconBasedOnName which calls ModElement#getGeneratableElement that is not thread safe

      Returns:
      A list of MCItems provided by this generatable element
    • getIconForMCItem

      default ImageIcon getIconForMCItem(Workspace workspace, String suffix)
      This method determines what icon should be used for a custom MCItem, according to its eventual suffix
      Parameters:
      workspace - The current workspace
      suffix - The suffix of the given MCItem (for example, "bucket" for fluid buckets). If this MCItem has no suffix, this will be the empty string.
      Returns:
      An ImageIcon to use for the given MCItem, or null to use the element preview image.