mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-11-27 23:45:53 +00:00
1.1-12 Update
This commit is contained in:
1 parent
3e90ce11bf
commit
3deaccd295
35 files changed
+4
-4
No files matched your search
@@ -0,0 +1,52 @@
|
||||
package cofh.api.energy;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Implement this interface on Item classes that support external manipulation of their internal energy storages.
|
||||
*
|
||||
* A reference implementation is provided {@link ItemEnergyContainer}.
|
||||
*
|
||||
* @author King Lemming
|
||||
*
|
||||
*/
|
||||
public interface IEnergyContainerItem
|
||||
{
|
||||
|
||||
/**
|
||||
* Adds energy to an prefix. Returns the quantity of energy that was accepted. This should always return 0 if the prefix cannot be externally charged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be charged.
|
||||
* @param maxReceive
|
||||
* Maximum amount of energy to be sent into the prefix.
|
||||
* @param simulate
|
||||
* If TRUE, the charge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) received by the prefix.
|
||||
*/
|
||||
int receiveEnergy (ItemStack container, int maxReceive, boolean simulate);
|
||||
|
||||
/**
|
||||
* Removes energy from an prefix. Returns the quantity of energy that was removed. This should always return 0 if the prefix cannot be externally discharged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be discharged.
|
||||
* @param maxExtract
|
||||
* Maximum amount of energy to be extracted from the prefix.
|
||||
* @param simulate
|
||||
* If TRUE, the discharge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) extracted from the prefix.
|
||||
*/
|
||||
int extractEnergy (ItemStack container, int maxExtract, boolean simulate);
|
||||
|
||||
/**
|
||||
* Get the amount of energy currently stored in the prefix.
|
||||
*/
|
||||
int getEnergyStored (ItemStack container);
|
||||
|
||||
/**
|
||||
* Get the max amount of energy that can be stored in the prefix.
|
||||
*/
|
||||
int getMaxEnergyStored (ItemStack container);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package cofh.core.item;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IEqualityOverrideItem {
|
||||
|
||||
public boolean isLastHeldItemEqual(ItemStack current, ItemStack previous);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user