mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 20:12:30 +00:00
Updated CoFH API
This commit is contained in:
1 parent
77c68b05bf
commit
1580d968ec
5 files changed
+81
-1
No files matched your search
@@ -6,6 +6,6 @@ public class CoFHAPIProps {
|
||||
|
||||
}
|
||||
|
||||
public static final String VERSION = "1.7.10R1.0.1";
|
||||
public static final String VERSION = "1.7.10R1.0.10";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cofh.api.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Implement this interface on Item classes which may be "Empowered" - what that means is completely up to you. This just provides a uniform way of dealing with
|
||||
* them.
|
||||
*
|
||||
* @author King Lemming
|
||||
*
|
||||
*/
|
||||
public interface IEmpowerableItem {
|
||||
|
||||
/**
|
||||
* Check whether or not a given item is currently in an empowered state.
|
||||
*/
|
||||
boolean isEmpowered(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Attempt to set the empowered state of the item.
|
||||
*
|
||||
* @param stack
|
||||
* ItemStack to be empowered/disempowered.
|
||||
* @param state
|
||||
* Desired state.
|
||||
* @return TRUE if the operation was successful, FALSE if it was not.
|
||||
*/
|
||||
boolean setEmpoweredState(ItemStack stack, boolean state);
|
||||
|
||||
/**
|
||||
* Callback method for reacting to a state change. Useful in KeyBinding handlers.
|
||||
*
|
||||
* @param player
|
||||
* Player holding the item, if applicable.
|
||||
* @param stack
|
||||
* The item being held.
|
||||
*/
|
||||
void onStateChange(EntityPlayer player, ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cofh.api.item;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Implement this interface on Item classes that are themselves inventories.
|
||||
*
|
||||
* A reference implementation is provided {@link ItemInventoryContainer}.
|
||||
*
|
||||
* @author King Lemming
|
||||
*
|
||||
*/
|
||||
public interface IInventoryContainerItem {
|
||||
|
||||
/**
|
||||
* Get the size of this inventory of this container item.
|
||||
*/
|
||||
int getSizeInventory(ItemStack container);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* (C) 2014 Team CoFH / CoFH / Cult of the Full Hub
|
||||
* http://www.teamcofh.com
|
||||
*/
|
||||
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|item")
|
||||
package cofh.api.item;
|
||||
|
||||
import cofh.api.CoFHAPIProps;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* (C) 2014 Team CoFH / CoFH / Cult of the Full Hub
|
||||
* http://www.teamcofh.com
|
||||
*/
|
||||
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHLib", provides = "CoFHAPI")
|
||||
package cofh.api;
|
||||
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Reference in new issue
Block a user