FarLands

FarLands

35.1k Downloads

Fix sounds being broken at high distances

muzikbike opened this issue ยท 2 comments

commented

Very very noticeable one chunk after 268435456, or after chunk 16777216.

Subtitles still show up though.

Mob sounds seem to give up and go completely silent past this point. Block placement and breaking sounds act interestingly; being beyond 268435472 and placing a block beyond 268435472 produces an audible sound, as does being before that and placing a block before that. If you're beyond 268435472 and place a block before that number, it's completely silent, and same goes for if you're before there and place a block beyond it. Super strange.

commented

closing as the notice on this mod's readme has announced discontinuation for a while now - feel free to reopen in future if work starts again

commented

the sound packet doesn't require any changes, however AbstractSoundInstance does

public void playSound(double double_1, double double_2, double double_3, SoundEvent soundEvent_1, SoundCategory soundCategory_1, float float_1, float float_2, boolean boolean_1) {
      ...
      PositionedSoundInstance positionedSoundInstance_1 = new PositionedSoundInstance(soundEvent_1, soundCategory_1, float_1, float_2, (float)double_1, (float)double_2, (float)double_3);
                                                                                                                                       ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^
      ...
}
   public PositionedSoundInstance(SoundEvent soundEvent_1, SoundCategory soundCategory_1, float float_1, float float_2, float float_3, float float_4, float float_5)
                                                                                                                        ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^