Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
29 lines
907 B
Java
29 lines
907 B
Java
package org.bukkit.craftbukkit;
|
|
|
|
import io.papermc.paper.util.OldEnumHolderable;
|
|
import net.minecraft.core.Holder;
|
|
import net.minecraft.core.registries.Registries;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import org.bukkit.Sound;
|
|
|
|
public class CraftSound extends OldEnumHolderable<Sound, SoundEvent> implements Sound {
|
|
|
|
private static int count = 0;
|
|
|
|
public static Sound minecraftToBukkit(SoundEvent minecraft) {
|
|
return CraftRegistry.minecraftToBukkit(minecraft, Registries.SOUND_EVENT);
|
|
}
|
|
|
|
public static SoundEvent bukkitToMinecraft(Sound bukkit) {
|
|
return CraftRegistry.bukkitToMinecraft(bukkit);
|
|
}
|
|
|
|
public static Holder<SoundEvent> bukkitToMinecraftHolder(Sound bukkit) {
|
|
return CraftRegistry.bukkitToMinecraftHolder(bukkit, Registries.SOUND_EVENT);
|
|
}
|
|
|
|
public CraftSound(Holder<SoundEvent> soundEffect) {
|
|
super(soundEffect, count++);
|
|
}
|
|
}
|