aga посмотри на ют как юзать или может на гт розписаноSpotifyAPI?
aga посмотри на ют как юзать или может на гт розписаноSpotifyAPI?
ебал я враппер найти немогуaga посмотри на ют как юзать или может на гт розписано
Саламчик друзья захотел зделать музыку в чите
1 Шаг что нужно
заходим в Type.java и добавляем категорию "Sound"
Потом по вашему желанию делаете папку
содаем класс который будет для запуска
мой пример: AutoPlug.java
Потом делаем такое:
2 ШагAutoPlug.java:package ru.shield.modules.impl.sound; import ru.shield.events.Event; import ru.shield.modules.Function; import ru.shield.modules.FunctionAnnotation; import ru.shield.modules.Type; @FunctionAnnotation(name = "Авто Плаг", type = Type.Sound) public class AutoPlug extends Function { @Override public void onEvent(Event event) { } }
Заходим в Function.java
И делаем такое:
3 ШагFunction.java:AutoPlug phonk = Manager.FUNCTION_MANAGER.phonk; if (phonk.state) { SoundUtil.playSound(("music.mp3"), 75, false); }
Потом мы ищем класс SoundUtil
И меняем код на такой:
И зделайте свою музыку!SoundUtil.java:package ru.shield.util.sounds; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvents; import ru.shield.util.others.IMinecraft; import javax.sound.sampled.*; import java.io.BufferedInputStream; import java.io.InputStream; public class SoundUtil implements IMinecraft { private static Clip currentClip = null; public static void playSound(String sound, float value, boolean nonstop) { if (currentClip != null && currentClip.isRunning()) { currentClip.stop(); } try { currentClip = AudioSystem.getClip(); InputStream is = mc.getResourceManager().getResource(new ResourceLocation("expensive/sounds/" + sound)).getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(bis); if (audioInputStream == null) { System.out.println("Sound not found!"); return; } currentClip.open(audioInputStream); currentClip.start(); FloatControl floatControl = (FloatControl) currentClip.getControl(FloatControl.Type.MASTER_GAIN); float min = floatControl.getMinimum(); float max = floatControl.getMaximum(); float volumeInDecibels = (float) (min * (1 - (value / 100.0)) + max * (value / 100.0)); floatControl.setValue(volumeInDecibels); if (nonstop) { currentClip.addLineListener(event -> { if (event.getType() == LineEvent.Type.STOP) { currentClip.setFramePosition(0); currentClip.start(); } }); } } catch (Exception exception) { // Обработка исключения exception.printStackTrace(); } } }
Потом добавляем в FunctionManager такое:
FunctionManager.java:public final AutoPlug phonk; this.phonk = new AutoPlug(),
Пожалуйста, авторизуйтесь для просмотра ссылки.
Удачи пастеры
Саламчик друзья захотел зделать музыку в чите
1 Шаг что нужно
заходим в Type.java и добавляем категорию "Sound"
Потом по вашему желанию делаете папку
содаем класс который будет для запуска
мой пример: AutoPlug.java
Потом делаем такое:
2 ШагAutoPlug.java:package ru.shield.modules.impl.sound; import ru.shield.events.Event; import ru.shield.modules.Function; import ru.shield.modules.FunctionAnnotation; import ru.shield.modules.Type; @FunctionAnnotation(name = "Авто Плаг", type = Type.Sound) public class AutoPlug extends Function { @Override public void onEvent(Event event) { } }
Заходим в Function.java
И делаем такое:
3 ШагFunction.java:AutoPlug phonk = Manager.FUNCTION_MANAGER.phonk; if (phonk.state) { SoundUtil.playSound(("music.mp3"), 75, false); }
Потом мы ищем класс SoundUtil
И меняем код на такой:
И зделайте свою музыку!SoundUtil.java:package ru.shield.util.sounds; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvents; import ru.shield.util.others.IMinecraft; import javax.sound.sampled.*; import java.io.BufferedInputStream; import java.io.InputStream; public class SoundUtil implements IMinecraft { private static Clip currentClip = null; public static void playSound(String sound, float value, boolean nonstop) { if (currentClip != null && currentClip.isRunning()) { currentClip.stop(); } try { currentClip = AudioSystem.getClip(); InputStream is = mc.getResourceManager().getResource(new ResourceLocation("expensive/sounds/" + sound)).getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(bis); if (audioInputStream == null) { System.out.println("Sound not found!"); return; } currentClip.open(audioInputStream); currentClip.start(); FloatControl floatControl = (FloatControl) currentClip.getControl(FloatControl.Type.MASTER_GAIN); float min = floatControl.getMinimum(); float max = floatControl.getMaximum(); float volumeInDecibels = (float) (min * (1 - (value / 100.0)) + max * (value / 100.0)); floatControl.setValue(volumeInDecibels); if (nonstop) { currentClip.addLineListener(event -> { if (event.getType() == LineEvent.Type.STOP) { currentClip.setFramePosition(0); currentClip.start(); } }); } } catch (Exception exception) { // Обработка исключения exception.printStackTrace(); } } }
Потом добавляем в FunctionManager такое:
FunctionManager.java:public final AutoPlug phonk; this.phonk = new AutoPlug(),
Пожалуйста, авторизуйтесь для просмотра ссылки.
Удачи пастеры
Всё правильноа типа нахуя эта функция тип заходишь там на дуельки и под песенку их разьебываешь ?
sigmaзакачаю шамана и буду гонять на фт
БЛЯТЬ ИДИ НАХУЙ ПРОСТОУдачи пастеры
Готовофуху ждем радио приемник в чите, братишка не останавливайся
package dev.dissolve.client.module.impl.player;
import dev.dissolve.impl.value.impl.ModeValue;
import dev.dissolve.impl.value.impl.NumberValue;
import dev.dissolve.impl.value.mode.SubMode;
import javazoom.jl.decoder.Bitstream;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.advanced.AdvancedPlayer;
import javazoom.jl.player.advanced.PlaybackEvent;
import javazoom.jl.player.advanced.PlaybackListener;
import dev.dissolve.client.module.api.Category;
import dev.dissolve.client.module.api.Module;
import dev.dissolve.client.module.api.ModuleInfo;
import java.io.IOException;
import java.net.URL;
@ModuleInfo(name = "Radio", description = "", category = Category.PLAYER)//code by terex_mint
public class Radio extends Module {//code by terex_mint
private final ModeValue sound = new ModeValue("Тип", this)//code by terex_mint
.add(new SubMode("Шоколад"),//code by terex_mint
new SubMode("Шансон")//code by terex_mint
);//code by terex_mint
private final NumberValue volume = new NumberValue("Громкость", this, 15, 5, 100, 1);//code by terex_mint
//code by terex_mint
private AdvancedPlayer player;//code by terex_mint
//code by terex_mint
@Override//code by terex_mint
protected void onEnable() {//code by terex_mint
super.onEnable();//code by terex_mint
//code by terex_mint
try {//code by terex_mint
if (sound.is("Шоколад")) {//code by terex_mint
playStream("http://choco.hostingradio.ru:10010/fm");//code by terex_mint
}//code by terex_mint
if (sound.is("Шансон")) {//code by terex_mint
playStream("http://zaycevfm.cdnvideo.ru/ZaycevFM_shanson_256.mp3");//code by terex_mint
}//code by terex_mint
}//code by terex_mint
//code by terex_mint
catch (JavaLayerException | IOException e) {//code by terex_mint
e.printStackTrace();//code by terex_mint
}//code by terex_mint
}//code by terex_mint
//code by terex_mint
@Override//code by terex_mint
protected void onDisable() {//code by terex_mint
super.onDisable();//code by terex_mint
stopStream();//code by terex_mint
}//code by terex_mint
//code by terex_mint
public void playStream(String audioUrl) throws JavaLayerException, IOException {//code by terex_mint
URL url = new URL(audioUrl);//code by terex_mint
Bitstream bitstream = new Bitstream(url.openStream());//code by terex_mint
//code by terex_mint
player = new AdvancedPlayer(url.openStream(), javazoom.jl.player.FactoryRegistry.systemRegistry().createAudioDevice());//code by terex_mint
player.setPlayBackListener(new PlaybackListener() {//code by terex_mint
@Override//code by terex_mint
public void playbackFinished(PlaybackEvent evt) {//code by terex_mint
System.out.println("Playback finished");//code by terex_mint
}//code by terex_mint
});//code by terex_mint
//code by terex_mint
// Устанавливаем громкость
//float volumeValue = (float) volume.getValue() / 100.0f;
//player.setVolume(volumeValue);
//code by terex_mint
//code by terex_mint
new Thread(() -> {//code by terex_mint
try {//code by terex_mint
player.play();//code by terex_mint
} catch (JavaLayerException e) {//code by terex_mint
e.printStackTrace();
}//code by terex_mint
}).start();//code by terex_mint
}//code by terex_mint
//code by terex_mint
public void stopStream() {//code by terex_mint
if (player != null) {//code by terex_mint
player.close();//code by terex_mint
}//code by terex_mint
}//code by terex_mint
}//code by terex_mint
УЛЬТАНУЛГотово
Java:package dev.dissolve.client.module.impl.player; import dev.dissolve.impl.value.impl.ModeValue; import dev.dissolve.impl.value.impl.NumberValue; import dev.dissolve.impl.value.mode.SubMode; import javazoom.jl.decoder.Bitstream; import javazoom.jl.decoder.JavaLayerException; import javazoom.jl.player.advanced.AdvancedPlayer; import javazoom.jl.player.advanced.PlaybackEvent; import javazoom.jl.player.advanced.PlaybackListener; import dev.dissolve.client.module.api.Category; import dev.dissolve.client.module.api.Module; import dev.dissolve.client.module.api.ModuleInfo; import java.io.IOException; import java.net.URL; @ModuleInfo(name = "Radio", description = "", category = Category.PLAYER)//code by terex_mint public class Radio extends Module {//code by terex_mint private final ModeValue sound = new ModeValue("Тип", this)//code by terex_mint .add(new SubMode("Шоколад"),//code by terex_mint new SubMode("Шансон")//code by terex_mint );//code by terex_mint private final NumberValue volume = new NumberValue("Громкость", this, 15, 5, 100, 1);//code by terex_mint //code by terex_mint private AdvancedPlayer player;//code by terex_mint //code by terex_mint @Override//code by terex_mint protected void onEnable() {//code by terex_mint super.onEnable();//code by terex_mint //code by terex_mint try {//code by terex_mint if (sound.is("Шоколад")) {//code by terex_mint playStream("http://choco.hostingradio.ru:10010/fm");//code by terex_mint }//code by terex_mint if (sound.is("Шансон")) {//code by terex_mint playStream("http://zaycevfm.cdnvideo.ru/ZaycevFM_shanson_256.mp3");//code by terex_mint }//code by terex_mint }//code by terex_mint //code by terex_mint catch (JavaLayerException | IOException e) {//code by terex_mint e.printStackTrace();//code by terex_mint }//code by terex_mint }//code by terex_mint //code by terex_mint @Override//code by terex_mint protected void onDisable() {//code by terex_mint super.onDisable();//code by terex_mint stopStream();//code by terex_mint }//code by terex_mint //code by terex_mint public void playStream(String audioUrl) throws JavaLayerException, IOException {//code by terex_mint URL url = new URL(audioUrl);//code by terex_mint Bitstream bitstream = new Bitstream(url.openStream());//code by terex_mint //code by terex_mint player = new AdvancedPlayer(url.openStream(), javazoom.jl.player.FactoryRegistry.systemRegistry().createAudioDevice());//code by terex_mint player.setPlayBackListener(new PlaybackListener() {//code by terex_mint @Override//code by terex_mint public void playbackFinished(PlaybackEvent evt) {//code by terex_mint System.out.println("Playback finished");//code by terex_mint }//code by terex_mint });//code by terex_mint //code by terex_mint // Устанавливаем громкость //float volumeValue = (float) volume.getValue() / 100.0f; //player.setVolume(volumeValue); //code by terex_mint //code by terex_mint new Thread(() -> {//code by terex_mint try {//code by terex_mint player.play();//code by terex_mint } catch (JavaLayerException e) {//code by terex_mint e.printStackTrace(); }//code by terex_mint }).start();//code by terex_mint }//code by terex_mint //code by terex_mint public void stopStream() {//code by terex_mint if (player != null) {//code by terex_mint player.close();//code by terex_mint }//code by terex_mint }//code by terex_mint }//code by terex_mint
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz