mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-30 21:23:00 +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:
		| @@ -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; | ||||
|                     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 SquidDev
					SquidDev