From 21f21dfc8362593bdc53de39be43be8b18efd9b2 Mon Sep 17 00:00:00 2001 From: lehjr Date: Fri, 13 Nov 2015 14:06:24 -0500 Subject: [PATCH] temporary fix for "Can't charge with IC2" --- .../machinemuse/api/electricity/ElectricAdapter.scala | 3 +-- .../machinemuse/api/electricity/MuseElectricItem.scala | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/scala/net/machinemuse/api/electricity/ElectricAdapter.scala b/src/main/scala/net/machinemuse/api/electricity/ElectricAdapter.scala index db7359a..d6179a5 100644 --- a/src/main/scala/net/machinemuse/api/electricity/ElectricAdapter.scala +++ b/src/main/scala/net/machinemuse/api/electricity/ElectricAdapter.scala @@ -20,7 +20,6 @@ object ElectricAdapter { null } } - } abstract class ElectricAdapter { @@ -75,4 +74,4 @@ class TEElectricAdapter(val stack: ItemStack) extends ElectricAdapter { def giveEnergy(provided: Double): Double = museEnergyFromRF(item.receiveEnergy(stack, museEnergyToRF(provided), false)) -} +} \ No newline at end of file diff --git a/src/main/scala/net/machinemuse/api/electricity/MuseElectricItem.scala b/src/main/scala/net/machinemuse/api/electricity/MuseElectricItem.scala index 64ac192..734e080 100644 --- a/src/main/scala/net/machinemuse/api/electricity/MuseElectricItem.scala +++ b/src/main/scala/net/machinemuse/api/electricity/MuseElectricItem.scala @@ -2,7 +2,7 @@ package net.machinemuse.api.electricity import cofh.api.energy.IEnergyContainerItem import cpw.mods.fml.common.Optional -import ic2.api.item.{IElectricItem, ElectricItem} +import ic2.api.item.{IElectricItemManager, ISpecialElectricItem, IElectricItem, ElectricItem} import net.machinemuse.api.ModuleManager import net.machinemuse.api.electricity.ElectricConversions._ import net.machinemuse.utils.{ElectricItemUtils, MuseItemUtils} @@ -13,9 +13,14 @@ import net.minecraft.item.{Item, ItemStack} * Author: MachineMuse (Claire Semple) * Created: 10:12 PM, 4/20/13 */ + +@Optional.Interface(iface = "ic2.api.item.IElectricItemManager", modid = "IC2", striprefs = true) +@Optional.Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2", striprefs = true) @Optional.Interface(iface = "cofh.api.energy.IEnergyContainerItem", modid = "CoFHCore", striprefs = true) trait MuseElectricItem extends Item with IEnergyContainerItem +with ISpecialElectricItem +with IElectricItemManager with IElectricItem { /** @@ -162,4 +167,4 @@ with IElectricItem def getMaxEnergyStored(theItem: ItemStack) = museEnergyToRF(getMaxEnergy(theItem)).toInt override def getMaxDamage(itemStack: ItemStack) = 0 -} +} \ No newline at end of file