Files
Paper/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSound.java
Nassim Jahnke f00727c57e 1.21.5
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>
2025-04-12 17:27:00 +02:00

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++);
}
}