mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-27 07:52:18 +00:00
parent
fb274e2ed6
commit
96c80a6549
@ -10,7 +10,7 @@ import net.minecraft.client.sound.AbstractSoundInstance;
|
||||
import net.minecraft.client.sound.SoundInstance;
|
||||
import net.minecraft.client.sound.TickableSoundInstance;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -21,7 +21,7 @@ public class SoundManager
|
||||
{
|
||||
private static final Map<UUID, MoveableSound> sounds = new HashMap<>();
|
||||
|
||||
public static void playSound( UUID source, Vec3d position, SoundEvent event, float volume, float pitch )
|
||||
public static void playSound( UUID source, Vec3d position, Identifier event, float volume, float pitch )
|
||||
{
|
||||
var soundManager = MinecraftClient.getInstance().getSoundManager();
|
||||
|
||||
@ -54,7 +54,7 @@ public class SoundManager
|
||||
|
||||
private static class MoveableSound extends AbstractSoundInstance implements TickableSoundInstance
|
||||
{
|
||||
protected MoveableSound( SoundEvent sound, Vec3d position, float volume, float pitch )
|
||||
protected MoveableSound( Identifier sound, Vec3d position, float volume, float pitch )
|
||||
{
|
||||
super( sound, SoundCategory.RECORDS );
|
||||
setPosition( position );
|
||||
|
@ -11,7 +11,6 @@ import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.network.PacketContext;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
@ -67,7 +66,6 @@ public class SpeakerPlayClientMessage implements NetworkMessage
|
||||
@Environment( EnvType.CLIENT )
|
||||
public void handle( PacketContext context )
|
||||
{
|
||||
SoundEvent sound = new SoundEvent( this.sound );
|
||||
SoundManager.playSound( source, pos, sound, volume, pitch );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user