Added UE integration for recipes
This commit is contained in:
parent
507f4cc06f
commit
53054f6c5e
5 changed files with 25 additions and 16 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "Universal-Electricity"]
|
[submodule "Modding-Library"]
|
||||||
path = Universal-Electricity
|
path = Modding-Library
|
||||||
url = https://github.com/Universal-Electricity/Universal-Electricity
|
url = git@bitbucket.org:calclavia/modding-library.git
|
||||||
|
|
1
Modding-Library
Submodule
1
Modding-Library
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 48d87abf9bb204dffec63ebedaeffce0c998e29f
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 3538b31ba452890fa742b472df2fb9d1555a61cd
|
|
|
@ -13,6 +13,8 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import org.modstats.ModstatInfo;
|
import org.modstats.ModstatInfo;
|
||||||
import org.modstats.Modstats;
|
import org.modstats.Modstats;
|
||||||
|
|
||||||
|
import basiccomponents.api.BasicRegistry;
|
||||||
|
import calclavia.lib.UniversalRecipes;
|
||||||
import resonantinduction.battery.BlockBattery;
|
import resonantinduction.battery.BlockBattery;
|
||||||
import resonantinduction.battery.ItemCapacitor;
|
import resonantinduction.battery.ItemCapacitor;
|
||||||
import resonantinduction.battery.TileEntityBattery;
|
import resonantinduction.battery.TileEntityBattery;
|
||||||
|
@ -100,7 +102,7 @@ public class ResonantInduction
|
||||||
* Settings
|
* Settings
|
||||||
*/
|
*/
|
||||||
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), NAME + ".cfg"));
|
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), NAME + ".cfg"));
|
||||||
public static float POWER_PER_COAL = 5;
|
public static float FURNACE_WATTAGE = 4;
|
||||||
public static boolean SOUND_FXS = true;
|
public static boolean SOUND_FXS = true;
|
||||||
|
|
||||||
/** Block ID by Jyzarc */
|
/** Block ID by Jyzarc */
|
||||||
|
@ -144,7 +146,7 @@ public class ResonantInduction
|
||||||
CONFIGURATION.load();
|
CONFIGURATION.load();
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
POWER_PER_COAL = (float) CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Coal Wattage", POWER_PER_COAL).getDouble(POWER_PER_COAL);
|
FURNACE_WATTAGE = (float) CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Furnace Wattage", FURNACE_WATTAGE).getDouble(FURNACE_WATTAGE);
|
||||||
SOUND_FXS = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Tesla Sound FXs", SOUND_FXS).getBoolean(SOUND_FXS);
|
SOUND_FXS = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Tesla Sound FXs", SOUND_FXS).getBoolean(SOUND_FXS);
|
||||||
MAX_CONTRACTOR_DISTANCE = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Max EM Contractor Path", MAX_CONTRACTOR_DISTANCE).getInt(MAX_CONTRACTOR_DISTANCE);
|
MAX_CONTRACTOR_DISTANCE = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Max EM Contractor Path", MAX_CONTRACTOR_DISTANCE).getInt(MAX_CONTRACTOR_DISTANCE);
|
||||||
|
|
||||||
|
@ -187,6 +189,11 @@ public class ResonantInduction
|
||||||
ResonantInduction.proxy.registerRenderers();
|
ResonantInduction.proxy.registerRenderers();
|
||||||
|
|
||||||
TabRI.ITEMSTACK = new ItemStack(blockBattery);
|
TabRI.ITEMSTACK = new ItemStack(blockBattery);
|
||||||
|
|
||||||
|
// Basic Components
|
||||||
|
BasicRegistry.register("itemIngotSteel");
|
||||||
|
BasicRegistry.register("itemPlateSteel");
|
||||||
|
BasicRegistry.register("itemIngotBronze");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -214,26 +221,28 @@ public class ResonantInduction
|
||||||
ItemStack emptyCapacitor = new ItemStack(itemCapacitor);
|
ItemStack emptyCapacitor = new ItemStack(itemCapacitor);
|
||||||
((IItemElectric) itemCapacitor).setElectricity(emptyCapacitor, 0);
|
((IItemElectric) itemCapacitor).setElectricity(emptyCapacitor, 0);
|
||||||
|
|
||||||
|
final ItemStack defaultWire = new ItemStack(blockWire, 1, EnumWire.IRON.ordinal());
|
||||||
|
|
||||||
/** Capacitor **/
|
/** Capacitor **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(emptyCapacitor, "RRR", "RIR", "RRR", 'R', Item.redstone, 'I', Item.ingotIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(emptyCapacitor, "RRR", "RIR", "RRR", 'R', Item.redstone, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||||
|
|
||||||
/** Linker **/
|
/** Linker **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemLinker, " E ", "GCG", " E ", 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'G', Item.ingotGold));
|
GameRegistry.addRecipe(new ShapedOreRecipe(itemLinker, " E ", "GCG", " E ", 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'G', UniversalRecipes.SECONDARY_METAL));
|
||||||
|
|
||||||
/** Quantum Entangler **/
|
/** Quantum Entangler **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemQuantumEntangler, "EEE", "ILI", "EEE", 'E', Item.eyeOfEnder, 'L', itemLinker, 'I', Item.ingotIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(itemQuantumEntangler, "EEE", "ILI", "EEE", 'E', Item.eyeOfEnder, 'L', itemLinker, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||||
|
|
||||||
/** Tesla - by Jyzarc */
|
/** Tesla - by Jyzarc */
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTesla, "EEE", " C ", " I ", 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'I', Block.blockIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockTesla, "WEW", " C ", " I ", 'W', defaultWire, 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'I', UniversalRecipes.PRIMARY_PLATE));
|
||||||
|
|
||||||
/** Multimeter */
|
/** Multimeter */
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockMultimeter, "RRR", "ICI", "III", 'R', Item.redstone, 'C', emptyCapacitor, 'I', Item.ingotIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockMultimeter, "WWW", "ICI", 'W', defaultWire, 'C', emptyCapacitor, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||||
|
|
||||||
/** Multimeter */
|
/** Multimeter */
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockBattery, "III", "IRI", "III", 'R', Block.blockRedstone, 'I', Item.ingotIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockBattery, "III", "IRI", "III", 'R', Block.blockRedstone, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||||
|
|
||||||
/** EM Contractor */
|
/** EM Contractor */
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEMContractor, " I ", "GCG", "WWW", 'W', Block.wood, 'C', emptyCapacitor, 'G', Item.ingotGold, 'I', Item.ingotIron));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockEMContractor, " I ", "GCG", "WWW", 'W', UniversalRecipes.PRIMARY_METAL, 'C', emptyCapacitor, 'G', UniversalRecipes.SECONDARY_METAL, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||||
|
|
||||||
/** Wires **/
|
/** Wires **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockWire, 1, EnumWire.COPPER.ordinal()), "MMM", 'M', "ingotCopper"));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockWire, 1, EnumWire.COPPER.ordinal()), "MMM", 'M', "ingotCopper"));
|
||||||
|
|
|
@ -268,7 +268,7 @@ public class TileEntityTesla extends TileEntityUniversalElectrical implements IT
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.transfer(ResonantInduction.POWER_PER_COAL / 20, true);
|
this.transfer(ResonantInduction.FURNACE_WATTAGE / 20, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doBlockStateUpdate != furnaceTile.furnaceBurnTime > 0)
|
if (doBlockStateUpdate != furnaceTile.furnaceBurnTime > 0)
|
||||||
|
@ -276,7 +276,7 @@ public class TileEntityTesla extends TileEntityUniversalElectrical implements IT
|
||||||
BlockFurnace.updateFurnaceBlockState(furnaceTile.furnaceBurnTime > 0, furnaceTile.worldObj, furnaceTile.xCoord, furnaceTile.yCoord, furnaceTile.zCoord);
|
BlockFurnace.updateFurnaceBlockState(furnaceTile.furnaceBurnTime > 0, furnaceTile.worldObj, furnaceTile.xCoord, furnaceTile.yCoord, furnaceTile.zCoord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.getEnergyStored() > ResonantInduction.POWER_PER_COAL / 20 && furnaceTile.getStackInSlot(1) == null && FurnaceRecipes.smelting().getSmeltingResult(furnaceTile.getStackInSlot(0)) != null)
|
else if (this.getEnergyStored() > ResonantInduction.FURNACE_WATTAGE / 20 && furnaceTile.getStackInSlot(1) == null && FurnaceRecipes.smelting().getSmeltingResult(furnaceTile.getStackInSlot(0)) != null)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Inject power to furnace.
|
* Inject power to furnace.
|
||||||
|
@ -284,7 +284,7 @@ public class TileEntityTesla extends TileEntityUniversalElectrical implements IT
|
||||||
boolean doBlockStateUpdate = furnaceTile.furnaceBurnTime > 0;
|
boolean doBlockStateUpdate = furnaceTile.furnaceBurnTime > 0;
|
||||||
|
|
||||||
furnaceTile.furnaceBurnTime += 2;
|
furnaceTile.furnaceBurnTime += 2;
|
||||||
this.transfer(-ResonantInduction.POWER_PER_COAL / 20, true);
|
this.transfer(-ResonantInduction.FURNACE_WATTAGE / 20, true);
|
||||||
|
|
||||||
if (doBlockStateUpdate != furnaceTile.furnaceBurnTime > 0)
|
if (doBlockStateUpdate != furnaceTile.furnaceBurnTime > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue