Jump to content

Slavnetic

Members
  • Posts

    1
  • Joined

  • Last visited

Slavnetic's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ive been trying to implement soundevents into the mod but it keeps throwing up an error on line 23 and it says 'SoundEvent(net.minecraft.resources.ResourceLocation, float, boolean)' has private access in 'net.minecraft.sounds.SoundEvent' Heres the code. package net.slavnetic.breakingbadblock.sound; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvent; import net.minecraftforge.common.util.ForgeSoundType; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; import net.slavnetic.breakingbadblock.BreakingBadblock; public class ModSounds { public static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, BreakingBadblock.MOD_ID); public static final RegistryObject<SoundEvent> BBTHEME = registerSoundEvent("bbtheme"); private static RegistryObject<SoundEvent> registerSoundEvent(String name) { return SOUND_EVENTS.register(name, () -> new SoundEvent(new ResourceLocation(BreakingBadblock.MOD_ID, name))); } public static void register(IEventBus eventBus) { SOUND_EVENTS.register(eventBus); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.