Taterzens [Fabric]

Taterzens [Fabric]

86.3k Downloads

1.17.1 issue when playing sounds when the mod is installed serverside.

Alkiasan opened this issue · 4 comments

commented

Whenever the NPC is supposed to make an ambient sound and send said sound to the client, the sound is not heard and this appears in the client's log:

Error executing task on Client
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_3414.method_14833()" because "☃" is null
	at Not Enough Crashes deobfuscated stack trace.(1.17.1+build.43)
	at net.minecraft.client.sound.PositionedSoundInstance.<init>(PositionedSoundInstance:46)
	at net.minecraft.client.sound.PositionedSoundInstance.<init>(PositionedSoundInstance:42)
	at net.minecraft.client.world.ClientWorld.playSound(ClientWorld:399)
	at net.minecraft.client.world.ClientWorld.playSound(ClientWorld:381)
	at net.minecraft.client.network.ClientPlayNetworkHandler.onPlaySound(ClientPlayNetworkHandler:1558)
	at net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket.apply(PlaySoundS2CPacket:83)
	at net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket.apply(PlaySoundS2CPacket:10)
	at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils:21)
	at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor:151)
	at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor:23)
	at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor:125)
	at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor:110)
	at net.minecraft.client.MinecraftClient.render(MinecraftClient:1075)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:728)
	at net.minecraft.client.main.Main.main(Main:217)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:567)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

Disabling sounds via tags fixes this, but it may need to be fixed for users who wish for NPCs to make sounds.

commented

Is your ambient sound array in config file empty?

commented

It is empty, and looks like this
image
It's the same both clientside and serverside

commented

Humm, I cannot seem to reproduce this ... 🤔
It's strange that it doesn't show error as

if(config.defaults.ambientSounds.isEmpty() || !this.npcData.allowSounds)

it should behave the same ... Are you using any other mods?

commented

It's likely either an incompatibility with PresenceFootsteps, or Dynamic Sound filters...