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:
parent
0a350077e9
commit
12e61efd76
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user