Class RecordItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.RecordItem
All Implemented Interfaces:
FeatureElement, ItemLike, IForgeItem

public class RecordItem extends Item
  • Field Details

  • Constructor Details

    • RecordItem

      @Deprecated public RecordItem(int p_239614_, SoundEvent p_239615_, Item.Properties p_239616_, int p_239617_)
      Deprecated.
    • RecordItem

      public RecordItem(int comparatorValue, Supplier<SoundEvent> soundSupplier, Item.Properties builder, int lengthInTicks)
      For mod use, allows to create a music disc without having to create a new SoundEvent before their registry event is fired.
      Parameters:
      comparatorValue - The value this music disc should output on the comparator. Must be between 0 and 15.
      soundSupplier - A supplier that provides the sound that should be played. Use a RegistryObject<SoundEvent> or a Holder<SoundEvent> for this parameter.
      builder - A set of Item.Properties that describe this item.
      lengthInTicks - The length of the music disc track in ticks.
  • Method Details