vlad2305m / Sound-Physics-Fabric

A Minecraft mod that provides realistic sound attenuation, reverberation, and absorption through blocks.
GNU General Public License v3.0
39 stars 6 forks source link

Fix: Mark as client mod #3

Closed spnda closed 3 years ago

spnda commented 3 years ago

This properly marks the mod as a client mod only.

vlad2305m commented 3 years ago

This is NOT a client-only mod, even if it can work like that.

spnda commented 3 years ago

@vlad2305m Just wondering, what purpose would manipulating OpenAL output be of any use on a Server? Besides, the mod tries to Mixin into net.minecraft.client.* classes which are not included on a Server JAR, because why should they? It crashes the server if you try to load it up with the mod installed. So I think this PR is perfectly valid and the mod should be client-side only.

See here my fabric 1.17.1 server log:

// net/minecraft/client/sound/SoundSystem
[17:03:57] [main/WARN]: Error loading class: net/minecraft/class_1140 (java.lang.ClassNotFoundException: net/minecraft/class_1140)
[17:03:57] [main/WARN]: @Mixin target net.minecraft.class_1140 was not found soundphysics.mixins.json:SoundSystemMixin

// net/minecraft/client/sound/Source
[17:03:57] [main/WARN]: Error loading class: net/minecraft/class_4224 (java.lang.ClassNotFoundException: net/minecraft/class_4224)
[17:03:57] [main/WARN]: @Mixin target net.minecraft.class_4224 was not found soundphysics.mixins.json:SourceMixin

To add to that, this exception gets thrown later on, outright crashing the server.

// net/minecraft/client/network/ClientPlayerEntity
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_746