blob: 3f7a1013e678caeedd93a4e4b18abd7bd8c5264d [file] [log] [blame] [raw]
package li.cil.oc.integration.opencomputers
import li.cil.oc.Constants
import li.cil.oc.api
import li.cil.oc.api.driver.item.HostAware
import li.cil.oc.api.network.EnvironmentHost
import li.cil.oc.common.Slot
import li.cil.oc.common.Tier
import li.cil.oc.server.component
import net.minecraft.item.ItemStack
object DriverUpgradeAngel extends Item with HostAware {
override def worksWith(stack: ItemStack) = isOneOf(stack,
api.Items.get(Constants.ItemName.AngelUpgrade))
override def createEnvironment(stack: ItemStack, host: EnvironmentHost) =
if (host.world != null && host.world.isRemote) null
else new component.UpgradeAngel()
override def slot(stack: ItemStack) = Slot.Upgrade
override def tier(stack: ItemStack) = Tier.Two
}