1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 02:10:30 +00:00

Fixes speakers playing incorrect sounds on the server

As a new SoundEvent was being created each time, the actual sound was
not in the registry, resulting in the sound -> id mapping yielding
incorrect values.
This commit is contained in:
SquidDev 2017-05-17 08:00:14 +01:00
parent 0a350077e9
commit 12e61efd76

View File

@ -238,7 +238,7 @@ public class SpeakerPeripheral implements IPeripheral {
@Nullable
@Override
public Object[] execute() throws LuaException {
world.playSound(null, pos, new SoundEvent(resource), SoundCategory.RECORDS, vol, soundPitch);
world.playSound( null, pos, SoundEvent.REGISTRY.getObject( resource ), SoundCategory.RECORDS, vol, soundPitch );
return null;
}