mirror of
https://github.com/TeamMidnightDust/VisualOverhaul.git
synced 2025-12-17 14:25:08 +01:00
Client side implementation of the jukebox overhaul
Uses a mixin into the sound system to determine the sound played at the position of the jukebox, then tries to get the record item of the sound. If it fails it will fall back to the server side implementation.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package eu.midnightdust.visualoverhaul.util.sound;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class SoundTest {
|
||||
|
||||
public static Map<BlockPos, Identifier> soundPos = Maps.newHashMap();
|
||||
|
||||
/**
|
||||
* Returns the Sound provided in MixinSoundSystem
|
||||
* {@link eu.midnightdust.visualoverhaul.mixin.MixinSoundSystem}
|
||||
*/
|
||||
public static Identifier getSound(BlockPos pos) {
|
||||
if (soundPos.containsKey(pos)) {
|
||||
return soundPos.get(pos);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user