fixed some deprecated syntax
This commit is contained in:
parent
50f7f8dd77
commit
0252872b55
4 changed files with 6 additions and 11 deletions
|
@ -2,14 +2,12 @@ package net.machinemuse.api
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.machinemuse.utils.{ElectricItemUtils, MuseItemUtils}
|
||||
import net.machinemuse.utils.ElectricItemUtils
|
||||
import net.machinemuse.powersuits.powermodule.armor.{HazmatModule, ApiaristArmorModule}
|
||||
import forestry.api.apiculture.IArmorApiarist
|
||||
import net.minecraft.entity.EntityLivingBase
|
||||
import atomicscience.api.IAntiPoisonArmor
|
||||
import atomicscience.api.poison.Poison
|
||||
import net.machinemuse.api.ModuleManager.itemHasActiveModule
|
||||
import net.machinemuse.api.ModuleManager
|
||||
|
||||
/**
|
||||
* Author: MachineMuse (Claire Semple)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.machinemuse.api
|
||||
|
||||
import mods.railcraft.api.core.items.IToolCrowbar
|
||||
import net.machinemuse.utils.{ElectricItemUtils, MuseItemUtils}
|
||||
import net.machinemuse.utils.ElectricItemUtils
|
||||
import net.machinemuse.powersuits.powermodule.tool.{MFFSFieldTeleporterModule, OmniWrenchModule}
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
|
@ -11,8 +11,6 @@ import cpw.mods.fml.common.FMLCommonHandler
|
|||
import mods.mffs.api.IFieldTeleporter
|
||||
import powercrystals.minefactoryreloaded.api.IToolHammerAdvanced
|
||||
import net.minecraft.util.ChatMessageComponent
|
||||
import net.machinemuse.api.ModuleManager.{itemHasActiveModule, itemHasModule}
|
||||
import net.machinemuse.api.ModuleManager
|
||||
|
||||
/**
|
||||
* Author: MachineMuse (Claire Semple)
|
||||
|
@ -54,8 +52,7 @@ trait ModularCrowbar extends IToolCrowbar {
|
|||
|
||||
|
||||
trait ModularWrench
|
||||
extends IToolWrench // Buildcraft wrench
|
||||
{
|
||||
extends IToolWrench // Buildcraft wrench {
|
||||
|
||||
def canWrench(player: EntityPlayer, x: Int, y: Int, z: Int): Boolean = {
|
||||
if (player.getCurrentEquippedItem != null && player.getCurrentEquippedItem.getItem.isInstanceOf[IModularItem]) {
|
||||
|
|
|
@ -25,9 +25,9 @@ object ElectricConversions {
|
|||
def museEnergyFromMJ(mj: Double): Double = mj * ModCompatability.getBCRatio
|
||||
|
||||
// UE
|
||||
def museEnergyToElectricityPack(museEnergy: Double, voltage: Float): ElectricityPack = new ElectricityPack(museEnergyToJoules(museEnergy) * 20.F / voltage, voltage)
|
||||
def museEnergyToElectricityPack(museEnergy: Double, voltage: Float): ElectricityPack = new ElectricityPack(museEnergyToJoules(museEnergy) * 20.0F / voltage, voltage)
|
||||
|
||||
def museEnergyFromElectricityPack(pack: ElectricityPack): Double = museEnergyFromJoules(pack.amperes / 20.F * pack.voltage)
|
||||
def museEnergyFromElectricityPack(pack: ElectricityPack): Double = museEnergyFromJoules(pack.amperes / 20.0F * pack.voltage)
|
||||
|
||||
def museEnergyToJoules(energy: Double): Float = (energy / ModCompatability.getUERatio).toFloat
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ trait ModeChangingModularItem extends ModeChangingItem {
|
|||
if (modes.size > 0 && dMode != 0) {
|
||||
val modeIndex: Int = modes.indexOf(mode)
|
||||
val newMode: String = modes.get(clampMode(modeIndex + dMode, modes.size))
|
||||
setActiveMode(stack, newMode)
|
||||
this.setActiveMode(stack, newMode)
|
||||
ModularPowersuits.proxy.sendModeChange(player, dMode, newMode)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue