mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2025-11-13 19:56:15 +00:00
refactor: at least reduce a bit of the mess
also about the pitch issue, it actually was intended to be like that, the clamp bypass already works, i just thought it can go unlimited
This commit is contained in:
parent
c1c7907e49
commit
8b7545ac16
1 changed files with 21 additions and 3 deletions
|
|
@ -66,10 +66,28 @@ public class ClientConnectionMixin {
|
|||
|
||||
if (world == null) return;
|
||||
|
||||
// huge mess
|
||||
final SoundEvent newSound = SoundEvent.of(Identifier.of(sound.getNamespace(), sound.getPath().substring(0, sound.getPath().length() - (".pitch." + stringPitch).length())));
|
||||
final SoundEvent newSound = SoundEvent.of(
|
||||
Identifier.of(
|
||||
sound.getNamespace(),
|
||||
sound.getPath().substring(0, sound.getPath().length() - (".pitch." + stringPitch).length())
|
||||
)
|
||||
);
|
||||
|
||||
client.executeSync(() -> world.playSound(client.player, t_packet.getX(), t_packet.getY(), t_packet.getZ(), newSound, t_packet.getCategory(), t_packet.getVolume(), pitch, t_packet.getSeed()));
|
||||
client.execute(() -> world.playSound(
|
||||
client.player,
|
||||
|
||||
t_packet.getX(),
|
||||
t_packet.getY(),
|
||||
t_packet.getZ(),
|
||||
|
||||
newSound,
|
||||
t_packet.getCategory(),
|
||||
|
||||
t_packet.getVolume(),
|
||||
pitch,
|
||||
|
||||
t_packet.getSeed()
|
||||
));
|
||||
|
||||
ci.cancel();
|
||||
} catch (NumberFormatException e) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue