package org.squiddev.plethora.integration.computercraft;

import com.google.common.collect.Maps;
import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.media.IMedia;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundEvent;
import org.squiddev.plethora.api.meta.BasicMetaProvider;
import org.squiddev.plethora.api.meta.IMetaProvider;

import javax.annotation.Nonnull;
import java.util.Collections;
import java.util.Map;

/**
 * Provider for all media items (disks and records)
 */
@IMetaProvider.Inject(value = ItemStack.class, modId = "ComputerCraft", namespace = "media")
public class MetaItemMedia extends BasicMetaProvider<ItemStack> {
	@Nonnull
	@Override
	public Map<Object, Object> getMeta(@Nonnull ItemStack object) {
		IMedia media = object.getItem() instanceof IMedia ? (IMedia) object.getItem() : ComputerCraft.getMedia(object);
		if (media == null) return Collections.emptyMap();

		Map<Object, Object> out = Maps.newHashMap();
		out.put("label", media.getLabel(object));
		out.put("recordTitle", media.getAudioTitle(object));

		SoundEvent soundEvent = media.getAudio(object);
		if (soundEvent != null) out.put("recordName", soundEvent.getSoundName().toString());

		return out;
	}
}

@@ -254,16 +254,82 @@
 dEvent;%0A
+import net.minecraftforge.fml.common.ObfuscationReflectionHelper;%0A
 import o
@@ -1212,16 +1212,21 @@
 = null) 
+%7B%0A%09%09%09
 out.put(
@@ -1243,32 +1243,98 @@
 e%22, 
-soundEvent.getSoundName(
+ObfuscationReflectionHelper.getPrivateValue(SoundEvent.class, soundEvent, %22field_187506_b%22
 ).to
@@ -1343,16 +1343,20 @@
 ring());
+%0A%09%09%7D
 %0A%0A%09%09retu

Fix accessing client-side-only method