Я так и делал, но этот класс вообще я не знаю, как использовать.
Да там нужна целая магия
😁. Все в приватах да финалах. Вот лови.
Location loc = block.getLocation();
Method method = CraftBlock.class.getDeclaredMethod("getNMSBlock");
method.setAccessible(true);
net.minecraft.server.v1_12_R1.Block b = (net.minecraft.server.v1_12_R1.Block)method.invoke(block);
SoundEffectType soundeffecttype = b.getStepSound();
CraftWorld w = (CraftWorld) loc.getWorld();
net.minecraft.server.v1_12_R1.World world = w.getHandle();
Field field = SoundEffectType.class.getDeclaredField("o");
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
SoundEffect se = (SoundEffect) field.get(soundeffecttype);
world.a(null, loc.getX(), loc.getY(), loc.getZ(), se, SoundCategory.BLOCKS, soundeffecttype.a(), 0.8f);