Class MusicDisc

java.lang.Object
net.mcreator.element.GeneratableElement
net.mcreator.element.types.MusicDisc
All Implemented Interfaces:
ICommonType, IItem, IItemWithTexture, IMCItemProvider, ITabContainedElement

public class MusicDisc extends GeneratableElement implements IItem, IItemWithTexture, ITabContainedElement
  • Field Details

    • name

      public String name
    • rarity

      public String rarity
    • texture

      public String texture
    • description

      public String description
    • creativeTab

      public TabEntry creativeTab
    • specialInformation

      public StringListProcedure specialInformation
    • glowCondition

      public LogicProcedure glowCondition
    • music

      public Sound music
    • lengthInTicks

      public int lengthInTicks
    • analogOutput

      public int analogOutput
    • onRightClickedInAir

      public Procedure onRightClickedInAir
    • onRightClickedOnBlock

      public Procedure onRightClickedOnBlock
    • onCrafted

      public Procedure onCrafted
    • onEntityHitWith

      public Procedure onEntityHitWith
    • onItemInInventoryTick

      public Procedure onItemInInventoryTick
    • onItemInUseTick

      public Procedure onItemInUseTick
    • onEntitySwing

      public Procedure onEntitySwing
  • Constructor Details

    • MusicDisc

      public MusicDisc(ModElement element)
  • Method Details

    • getTexture

      public String getTexture()
      Specified by:
      getTexture in interface IItemWithTexture
    • generateModElementPicture

      public BufferedImage generateModElementPicture()
      Overrides:
      generateModElementPicture in class GeneratableElement
      Returns:
      BufferedImage of mod element preview or null if default mod element icon should be used
    • getCreativeTab

      public TabEntry getCreativeTab()
      Specified by:
      getCreativeTab in interface ITabContainedElement
    • providedMCItems

      public List<MCItem> providedMCItems()
      Description copied from interface: IMCItemProvider
      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

      Specified by:
      providedMCItems in interface IMCItemProvider
      Returns:
      A list of MCItems provided by this generatable element
    • getCreativeTabItems

      public List<MCItem> getCreativeTabItems()
      Description copied from interface: ITabContainedElement
      WARNING: Calls to this method are generally not thread safe. Implementations can call MCItem.Custom::new that calls getBlockIconBasedOnName that calls ModElement#getGeneratableElement which is not thread safe
      Specified by:
      getCreativeTabItems in interface ITabContainedElement
      Returns:
      list of items in the creative tab of this element