Ported sounds.
This commit is contained in:
@ -33,7 +33,7 @@ public class FireflyBushBlock extends BushBlock implements IGrowable {
|
||||
(isMoonVisible(level) && level.getHeight(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, blockPos.getX(), blockPos.getZ()) <= blockPos.getY())
|
||||
)) {
|
||||
level.playLocalSound(
|
||||
blockPos, ModSounds.FIREFLY_BUSH_IDLE.get(), SoundCategory.AMBIENT, 1.0F, 1.0F, false
|
||||
blockPos.getX(), blockPos.getY(), blockPos.getZ(), ModSounds.FIREFLY_BUSH_IDLE.get(), SoundCategory.AMBIENT, 1.0F, 1.0F, false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package dev.micle.firefly_bush_backport.sound;
|
||||
|
||||
import dev.micle.firefly_bush_backport.FireflyBushBackport;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModSounds {
|
||||
public static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, FireflyBushBackport.MOD_ID);
|
||||
@ -18,6 +18,6 @@ public class ModSounds {
|
||||
}
|
||||
|
||||
private static RegistryObject<SoundEvent> registerSoundEvent(String name) {
|
||||
return SOUND_EVENTS.register(name, () -> SoundEvent.createVariableRangeEvent(ResourceLocation.fromNamespaceAndPath(FireflyBushBackport.MOD_ID, name)));
|
||||
return SOUND_EVENTS.register(name, () -> new SoundEvent(new ResourceLocation(FireflyBushBackport.MOD_ID, name)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user