PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

1.18.2 Invalid moving sound AIR_LEAK

Raidobw2 opened this issue · 5 comments

commented

Describe the bug

I created a floating platform of portals in the AE2 Spatial IO dimension to serve as our hub. At the same time my friend was progressing in PneumaticCraft and placed a few Safety Tube Modules which frequently play the AIR_LEAK sound. Using these portals often leads to a client-side crash:

java.lang.IllegalArgumentException: Invalid moving sound AIR_LEAK for focus object BlockPos{x=154, y=79, z=204}

The coordinates in each crash report point to a PneumaticCraft Safety Tube Module, which plays the AIR_LEAK sound every few seconds.

Versions:

Minecraft 1.18.2
Forge 40.1.52
PneumaticCraft pneumaticcraft-repressurized-1.18.2-3.3.0-99.jar
Mekanism Mekanism-1.18.2-10.2.4.464.jar
Modpack FTB Plexiglass Mountain 1.1.1

How to reproduce the bug

  1. Create a Mekanism Teleporter (unclear if it needs to be in/out of Spatial IO or not).
  2. Attach a Safety Tube Module to a pressure tube. We are using a Flux Compressor w/ 4 speed upgrades to pressurize the tube.
  3. Use the teleporter until the client crashes.

Expected behavior

No client crashes while using our teleporters

Additional details

Relayed from FTBTeam/FTB-Modpack-Issues#1071

image
image

Reading the code in MovingSounds.java for PNC, my guess is that this does have something to do with the portals crossing into different dimensions:

https://github.com/TeamPneumatic/pnc-repressurized/blob/1.18.2/src/main/java/me/desht/pneumaticcraft/client/sound/MovingSounds.java#L84-L89

The BlockEntity te = world.getBlockEntity(pos); assignment may be returning null because it is checking for the Safety Tube Module in the wrong dimension as the player teleports. It decides there is nothing there to play a sound for, breaks out of the switch and throws the exception. It seems like this could happen any time a player enters a new dimension and the sound is trying to play.

Thanks in advance!

Which Minecraft version are you using?

1.18

Which version of PneumaticCraft: Repressurized are you using?

1.18.2-3.3.0-99

Crash log

https://paste.feed-the-beast.com/view/76912281

commented

Yeah, I see the problem there. An exception should only be thrown if the packet data is downright invalid, but in this case the packet data is valid but the chunk isn't fully loaded clientside yet (which is why the block entity appears to be missing). In this case null needs to be returned indicating no sound to be played yet.

commented

The https://github.com/TeamPneumatic/pnc-repressurized/actions/runs/2634619301 build should fix this, feel free to test. The fix will be in the next release (3.3.2).

commented

Thanks for the quick turn-around!

commented

Fixed in 3.4.0 release

commented

Awesome, thank you!