generated from MrSphay/codex-agent-repository-kit
34 lines
1.1 KiB
Java
34 lines
1.1 KiB
Java
package com.vinlanx.explosionoverhaul.client;
|
|
|
|
import net.minecraft.client.resources.sounds.AbstractTickableSoundInstance;
|
|
import net.minecraft.client.resources.sounds.SoundInstance;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.world.phys.Vec3;
|
|
|
|
public class PositionalSoundInstance extends AbstractTickableSoundInstance {
|
|
public PositionalSoundInstance(SoundEvent sound, SoundSource source, float volume, float pitch, RandomSource random, double x, double y, double z) {
|
|
super(sound, source, random);
|
|
this.volume = volume;
|
|
this.pitch = pitch;
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
this.looping = false;
|
|
this.delay = 0;
|
|
this.relative = false;
|
|
this.attenuation = SoundInstance.Attenuation.LINEAR;
|
|
}
|
|
|
|
@Override
|
|
public void tick() {
|
|
}
|
|
|
|
public void updatePosition(Vec3 newPosition) {
|
|
this.x = newPosition.x();
|
|
this.y = newPosition.y();
|
|
this.z = newPosition.z();
|
|
}
|
|
}
|