diff --git a/libs/industrialcraft-2-2.2.780-experimental-dev.jar b/libs/industrialcraft-2-2.2.807-experimental-dev.jar similarity index 85% rename from libs/industrialcraft-2-2.2.780-experimental-dev.jar rename to libs/industrialcraft-2-2.2.807-experimental-dev.jar index 2e4dfe8..c151f55 100644 Binary files a/libs/industrialcraft-2-2.2.780-experimental-dev.jar and b/libs/industrialcraft-2-2.2.807-experimental-dev.jar differ diff --git a/src/api/java/ic2/api/crops/CropCard.class b/src/api/java/ic2/api/crops/CropCard.class index 73a1177..a1f2646 100644 Binary files a/src/api/java/ic2/api/crops/CropCard.class and b/src/api/java/ic2/api/crops/CropCard.class differ diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/api/java/ic2/api/crops/CropCard.java index 8d97252..1d2b640 100644 --- a/src/api/java/ic2/api/crops/CropCard.java +++ b/src/api/java/ic2/api/crops/CropCard.java @@ -37,13 +37,16 @@ public abstract class CropCard { /** * Determine the mod id owning this crop. * - * It's recommended to hard code this to your mod id. + * The owner serves as a name space. With every mod using a different owner, a mod only has to + * make sure it doesn't have conflicts with name() in itself. + * It's recommended to hard code this to your mod id as specified in the @Mod annotation. + * Do not use IC2's mod id here. * * @note changing name or owner will cause existing crops in users' worlds to disappear. * * @return Mod id. */ - public String owner() { + public String owner() { // TODO: make abstract return modId; } @@ -100,7 +103,7 @@ public abstract class CropCard { * @param crop reference to ICropTile * @return roots lengt use in isBlockBelow */ - public int getrootslength(ICropTile crop) { + public int getrootslength(ICropTile crop) { // TODO: camel case return 1; } @@ -126,7 +129,7 @@ public abstract class CropCard { * @param n index of the requested stat * @return The requested value of the stats */ - public abstract int stat(int n); + public abstract int stat(int n); // TODO: change to fixed property object or builder with other attributes like tier /** * Additional attributes of the plant, also influencing breeding. @@ -134,7 +137,7 @@ public abstract class CropCard { * * @return Attributes as an array of strings */ - public abstract String[] attributes(); + public abstract String[] attributes(); // TODO: default to none /** * Determine the max crop size. @@ -212,7 +215,7 @@ public abstract class CropCard { * @return 0-30 */ public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) { - return (int) (humidity+nutrients+air); + return (int) (humidity + nutrients + air); } /** @@ -247,7 +250,7 @@ public abstract class CropCard { * @return need crop size for best output. */ - public abstract int getOptimalHavestSize(ICropTile crop); + public abstract int getOptimalHavestSize(ICropTile crop); // TODO: default to maxSize /** * Check whether the crop can be harvested. @@ -255,7 +258,7 @@ public abstract class CropCard { * @param crop reference to ICropTile * @return Whether the crop can be harvested in its current state. */ - public abstract boolean canBeHarvested(ICropTile crop); + public abstract boolean canBeHarvested(ICropTile crop); // TODO: default to maxSize check /** * Base chance for dropping the plant's gains, specify values greater than 1 for multiple drops. @@ -282,20 +285,20 @@ public abstract class CropCard { * @param crop reference to ICropTile * @return Plant size after harvesting */ - public byte getSizeAfterHarvest(ICropTile crop) {return 1;} + public byte getSizeAfterHarvest(ICropTile crop) {return 1;} // TODO: change to int /** - * Called when the plant is leftclicked by a player. + * Called when the plant is left clicked by a player. * Default action is picking the plant. * - * Only called Serverside. + * Only called server side. * * @param crop reference to ICropTile - * @param player player leftclicked the crop + * @param player player left clicked the crop * @return Whether the plant has changed */ - public boolean leftclick(ICropTile crop, EntityPlayer player) { + public boolean leftclick(ICropTile crop, EntityPlayer player) { // TODO: camel case return crop.pick(true); } @@ -428,4 +431,5 @@ public abstract class CropCard { protected IIcon textures[]; private final String modId; // TODO: make owner abstract, remove modId auto detection + // TODO: add a clean way to obtain world reference and position } diff --git a/src/api/java/ic2/api/crops/ICropTile.class b/src/api/java/ic2/api/crops/ICropTile.class index b359a00..aafb6de 100644 Binary files a/src/api/java/ic2/api/crops/ICropTile.class and b/src/api/java/ic2/api/crops/ICropTile.class differ diff --git a/src/api/java/ic2/api/crops/ICropTile.java b/src/api/java/ic2/api/crops/ICropTile.java index 6fd887e..dadf691 100644 --- a/src/api/java/ic2/api/crops/ICropTile.java +++ b/src/api/java/ic2/api/crops/ICropTile.java @@ -260,6 +260,15 @@ public interface ICropTile { */ public boolean isBlockBelow(Block block); + /** + * Check if a block is under the farmland containing the crop. + * Searches up to 2 blocks below the farmland or an air space, whichever appears first. + * + * @param oreDictionaryName blocks to search + * @return Whether the blocks were found + */ + public boolean isBlockBelow(String oreDictionaryName); + /** * Generate plant seeds with the given parameters. * diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.class b/src/api/java/ic2/api/energy/prefab/BasicSink.class index b0b895c..1f411d4 100644 Binary files a/src/api/java/ic2/api/energy/prefab/BasicSink.class and b/src/api/java/ic2/api/energy/prefab/BasicSink.class differ diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/api/java/ic2/api/energy/prefab/BasicSource.class index 164213b..74bf5ea 100644 Binary files a/src/api/java/ic2/api/energy/prefab/BasicSource.class and b/src/api/java/ic2/api/energy/prefab/BasicSource.class differ diff --git a/src/api/java/ic2/api/info/Info.class b/src/api/java/ic2/api/info/Info.class index 7099fae..7e50751 100644 Binary files a/src/api/java/ic2/api/info/Info.class and b/src/api/java/ic2/api/info/Info.class differ diff --git a/src/api/java/ic2/api/info/Info.java b/src/api/java/ic2/api/info/Info.java index 3b5a544..f8e30ad 100644 --- a/src/api/java/ic2/api/info/Info.java +++ b/src/api/java/ic2/api/info/Info.java @@ -1,5 +1,6 @@ package ic2.api.info; +import net.minecraft.potion.Potion; import net.minecraft.util.DamageSource; import cpw.mods.fml.common.Loader; @@ -16,6 +17,12 @@ public class Info { */ public static DamageSource DMG_ELECTRIC, DMG_NUKE_EXPLOSION, DMG_RADIATION; + /** + * Potions used by IC2. + * Getting assigned in preload. + */ + public static Potion POTION_RADIATION; + public static boolean isIc2Available() { if (ic2Available != null) return ic2Available; diff --git a/src/api/java/ic2/api/item/IElectricItem.java b/src/api/java/ic2/api/item/IElectricItem.java index 5525e00..4f546d5 100644 --- a/src/api/java/ic2/api/item/IElectricItem.java +++ b/src/api/java/ic2/api/item/IElectricItem.java @@ -39,7 +39,9 @@ public interface IElectricItem { /** * Get the item's tier, lower tiers can't send energy to higher ones. - * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. + * + * Batteries are Tier 1, Advanced Batteries are Tier 2, Energy Crystals are Tier 3, Lapotron + * Crystals are Tier 4. * * @return Item's tier */ diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class index 1934b96..374f186 100644 Binary files a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class and b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class differ diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class index 0d6ca4e..b58008d 100644 Binary files a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class and b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class differ diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java index 504a003..68decbb 100644 --- a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java +++ b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java @@ -6,12 +6,26 @@ import net.minecraftforge.fluids.Fluid; public interface ILiquidHeatExchangerManager extends ILiquidAcceptManager { + /** + * Add a new fluid heatup/cooldown recipe. + * + * @param fluidName the fluid to heat up/cool down + * @param fluidOutput the fluid the above fluid turns into + * @param huPerMB the Thermal Energy difference in hU for the conversion of one mB fluid + */ void addFluid(String fluidName, String fluidOutput, int huPerMB); HeatExchangeProperty getHeatExchangeProperty(Fluid fluid); Map getHeatExchangeProperties(); + /** + * This returns an ILiquidAcceptManager that only accepts fluids, that can be heated up / cooled down, but not both. + * You can basically use this to check if the liquid resulting from this conversion can be reprocessed into the first one. + * @return Returns the SingleDirectionManager. + */ + ILiquidAcceptManager getSingleDirectionLiquidManager(); + public static class HeatExchangeProperty { public HeatExchangeProperty(Fluid outputFluid, int huPerMB) { this.outputFluid = outputFluid; diff --git a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java index dc2bf54..cd3a946 100644 --- a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java @@ -230,10 +230,10 @@ public class RecipeRegistry { new ItemStack[] { new ItemStack(ItemRegistry.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate") }); inventoryChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 1), 6, CraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), - new ItemStack[] { new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor") }); + new ItemStack[] { new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor") }); armorChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 0), 6, CraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), - new ItemStack[] { new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor") }); + new ItemStack[] { new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), ic2.core.Ic2Items.WindKineticGenerator, ic2.core.Ic2Items.WaterKineticGenerator, IC2Items.getItem("nuclearReactor") }); nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", RandomHelper.getChargedItem(ItemRegistry.nanoWing, 10), 4, CraftingAspects.nanoWing, new ItemStack(ItemRegistry.thaumiumWing), new ItemStack[] { IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1) });