Class SoundEffectDataFactory

java.lang.Object
johnsmith.enchantingoverhauled.client.gui.sound.SoundEffectDataFactory

public class SoundEffectDataFactory extends Object
Factory utility to automatically wrap vanilla's mixed SoundEvent types into unified SoundEffectData command objects.
  • Constructor Details

    • SoundEffectDataFactory

      public SoundEffectDataFactory()
  • Method Details

    • create

      public static SoundEffectData create(net.minecraft.sounds.SoundEvent event, float pitch, float volume)
      Wraps a raw, unboxed SoundEvent.
    • create

      public static SoundEffectData create(net.minecraft.core.Holder.Reference<net.minecraft.sounds.SoundEvent> event, float pitch, float volume)
      Wraps a Holder.Reference boxed SoundEvent.
    • create

      public static SoundEffectData create(net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> event, float pitch, float volume)
      Wraps a generic Holder boxed SoundEvent.