Package com.hbm_m.client.sound
Class MissileFlybySoundInstance
java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
com.hbm_m.client.sound.MissileFlybySoundInstance
- All Implemented Interfaces:
net.minecraft.client.resources.sounds.SoundInstance,net.minecraft.client.resources.sounds.TickableSoundInstance
public class MissileFlybySoundInstance
extends net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
Клиентский циклический звук пролётающей баллистической ракеты.
Модель звука дистанционная: единственный looping ogg, pitch не двигаем (никакого
«вытягивания» дорожки) — вместо этого гейн модулируется скоростью сближения/удаления:
- Запаздывающая позиция (retarded position): источник ставится туда, откуда
звук долетает до игрока сейчас (скорость звука
SPEED_OF_SOUND). Ракета, взлетевшая за 300+ блоков, слышна с натуральной задержкой с того направления. - Радиальный гейн: каждый тик считаем radial-скорость источника вдоль линии к слушателю. Сближение (отрицательная радиальная) → гейн растёт до полной громкости; боковой/висевший полёт (radial ≈ 0) → равномерный средний гейн; удаление (положительная) → гейн медленно спадает к половине и оттуда тает по расстоянию за счёт LINEAR-аттенюации с attenuation_distance: 512.
MissileSoundEngine), подающий позу и
скорость ракеты независимо от загрузки ванильной сущности (сетевой трек).-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.resources.sounds.SoundInstance
net.minecraft.client.resources.sounds.SoundInstance.Attenuation -
Field Summary
Fields inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
attenuation, delay, location, looping, pitch, random, relative, sound, source, volume, x, y, z -
Constructor Summary
ConstructorsConstructorDescriptionMissileFlybySoundInstance(net.minecraft.world.phys.Vec3 initialPos, net.minecraft.world.phys.Vec3 initialVel) -
Method Summary
Methods inherited from class net.minecraft.client.resources.sounds.AbstractTickableSoundInstance
isStopped, stopMethods inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance
getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getVolume, getX, getY, getZ, isLooping, isRelative, resolve, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.resources.sounds.SoundInstance
canPlaySound, canStartSilent, getAttenuation, getDelay, getLocation, getPitch, getSound, getSource, getStream, getVolume, getX, getY, getZ, isLooping, isRelative, resolve
-
Constructor Details
-
MissileFlybySoundInstance
public MissileFlybySoundInstance(net.minecraft.world.phys.Vec3 initialPos, net.minecraft.world.phys.Vec3 initialVel)
-
-
Method Details
-
tick
public void tick()
-