blob: c96725d4d65541988268b5ed0112eb1ad25b6441 [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.EnvironmentAware
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.server.component
import net.minecraft.item.ItemStack
object DriverGeolyzer extends Item with HostAware with EnvironmentAware {
override def worksWith(stack: ItemStack) = isOneOf(stack,
api.Items.get(Constants.BlockName.Geolyzer))
override def createEnvironment(stack: ItemStack, host: EnvironmentHost) =
if (host.world.isRemote) null
else new component.Geolyzer(host)
override def slot(stack: ItemStack) = Slot.Upgrade
override def providedEnvironment(stack: ItemStack) = classOf[component.Geolyzer]
}