mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-23 21:39:44 +00:00
991 files modified. GG ME. Still not done though
This is the first commit of the rewrite. A lot has been done, but it's not over.
This commit is contained in:
1 parent
621fb17840
commit
766aa180ae
569 files changed
+4065
-6321
No files matched your search
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
package ic2.api.info;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IEnergyValueProvider {
|
||||
/**
|
||||
* Determine the energy value for a single item in the supplied stack.
|
||||
* The value is used by most machines in the discharge slot.
|
||||
*
|
||||
* This only applies to basic single use items, others are to be queried
|
||||
* through e.g. ElectricItem.manager.getCharge().
|
||||
*
|
||||
* @param itemStack ItemStack containing the item to evaluate.
|
||||
* @return energy in EU
|
||||
*/
|
||||
double getEnergyValue(ItemStack itemStack);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
package ic2.api.info;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IFuelValueProvider {
|
||||
/**
|
||||
* Determine the fuel value for a single item in the supplied stack.
|
||||
* The information currently applies to Generators and the Iron Furnace.
|
||||
*
|
||||
* @param itemStack ItemStack containing the item to evaluate.
|
||||
* @param allowLava Determine if lava has a fuel value, currently only true for the Iron Furnace.
|
||||
* @return fuel value
|
||||
*/
|
||||
int getFuelValue(ItemStack itemStack, boolean allowLava);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
package ic2.api.info;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.LoaderState;
|
||||
|
||||
public class Info {
|
||||
public static IEnergyValueProvider itemEnergy;
|
||||
public static IFuelValueProvider itemFuel;
|
||||
public static Object ic2ModInstance;
|
||||
|
||||
/**
|
||||
* Damage Sources used by IC2.
|
||||
* Getting assigned in preload.
|
||||
*/
|
||||
public static DamageSource DMG_ELECTRIC, DMG_NUKE_EXPLOSION, DMG_RADIATION;
|
||||
|
||||
public static boolean isIc2Available() {
|
||||
if (ic2Available != null) return ic2Available;
|
||||
|
||||
boolean loaded = Loader.isModLoaded("IC2");
|
||||
|
||||
if (Loader.instance().hasReachedState(LoaderState.CONSTRUCTING)) {
|
||||
ic2Available = loaded;
|
||||
}
|
||||
|
||||
return loaded;
|
||||
}
|
||||
|
||||
private static Boolean ic2Available = null;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.info;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Reference in new issue
Block a user