Added maxdamage=0 so hopefully things stop breaking the armor unnecessarily. Closes #579
This commit is contained in:
parent
388821ed1b
commit
c0855df989
2 changed files with 52 additions and 48 deletions
|
@ -1,48 +0,0 @@
|
|||
package net.machinemuse.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Interface for ItemPowerArmor and ItemPowerTool to share.
|
||||
*
|
||||
* @author MachineMuse
|
||||
*/
|
||||
public interface IModularItem
|
||||
{
|
||||
|
||||
/**
|
||||
* Gets the item's extended summary for displaying in the gui.
|
||||
*
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
public List<String> getLongInfo(EntityPlayer player, ItemStack stack);
|
||||
|
||||
/**
|
||||
* Returns the amount of energy contained in the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public double getPlayerEnergy(EntityPlayer player);
|
||||
|
||||
/**
|
||||
* Drains the amount of energy from the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public void drainPlayerEnergy(EntityPlayer player, double drainAmount);
|
||||
|
||||
/**
|
||||
* Adds the amount of energy to the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public void givePlayerEnergy(EntityPlayer player, double joulesToGive);
|
||||
|
||||
}
|
52
src/main/scala/net/machinemuse/api/IModularItem.scala
Normal file
52
src/main/scala/net/machinemuse/api/IModularItem.scala
Normal file
|
@ -0,0 +1,52 @@
|
|||
package net.machinemuse.api
|
||||
|
||||
import java.util.List
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
/**
|
||||
* Interface for ItemPowerArmor and ItemPowerTool to share.
|
||||
*
|
||||
* @author MachineMuse
|
||||
*/
|
||||
trait IModularItem extends net.minecraft.item.Item {
|
||||
/**
|
||||
* Gets the item's extended summary for displaying in the gui.
|
||||
*
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
def getLongInfo(player: EntityPlayer, stack: ItemStack): List[String]
|
||||
|
||||
/**
|
||||
* Returns the amount of energy contained in the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
def getPlayerEnergy(player: EntityPlayer): Double
|
||||
|
||||
/**
|
||||
* Drains the amount of energy from the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
def drainPlayerEnergy(player: EntityPlayer, drainAmount: Double)
|
||||
|
||||
/**
|
||||
* Adds the amount of energy to the player's inventory.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
def givePlayerEnergy(player: EntityPlayer, joulesToGive: Double)
|
||||
|
||||
|
||||
/** Since this is the only mixin shared between the two, it's simplest to set it here.
|
||||
*
|
||||
* @param itemStack
|
||||
* @return 0
|
||||
*/
|
||||
override def getMaxDamage(itemStack:ItemStack) = 0
|
||||
}
|
Loading…
Reference in a new issue