blob: 59ac3818f22c785f5113d94d6dc2a023aea11690 [file] [log] [blame] [raw]
package li.cil.oc.integration.mystcraft;
import li.cil.oc.api.driver.Converter;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import java.util.Map;
public class ConverterPage implements Converter {
@Override
public void convert(final Object value, final Map<Object, Object> output) {
if (value instanceof ItemStack) {
final ItemStack stack = (ItemStack) value;
if ("item.myst.page".equals(stack.getUnlocalizedName()) && stack.hasTagCompound()) {
final NBTTagCompound tag = stack.getTagCompound();
output.put("symbol", tag.getString("symbol"));
}
}
}
}