Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7da7525257 | ||
|
|
3d40b4aae9 | ||
|
|
1b610403b3 | ||
|
|
7d239bd2ab | ||
|
|
d325af0a96 | ||
|
|
4735800f6c | ||
|
|
a0be2aac7f | ||
|
|
5716fb0d21 | ||
|
|
c64025e8ca | ||
|
|
bc46a1f198 |
No files matched your search
@@ -2,7 +2,7 @@ minecraft_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
forgeDep_version=10.13.4.1614
|
||||
|
||||
mod_version=2.3.1.4_beta
|
||||
mod_version=2.3.1.7_beta
|
||||
|
||||
#Comment out this line to get rid of the appendix
|
||||
#mod_appendix=beta
|
||||
|
||||
@@ -389,6 +389,75 @@
|
||||
</recipe>
|
||||
</recipeGroup>
|
||||
|
||||
<recipeGroup name="Endergy" >
|
||||
<recipe name="Crude Steel" energyCost="5000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="gravel" />
|
||||
<itemStack oreDictionary="itemClay" />
|
||||
<itemStack oreDictionary="cobblestone" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotCrudeSteel" number="1" exp="0.1" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Crystalline Alloy" energyCost="10000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="ingotGold" />
|
||||
<itemStack oreDictionary="itemPulsatingPowder" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotCrystallineAlloy" number="1" exp="0.5" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Melodic Alloy" energyCost="20000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="ingotEndSteel" />
|
||||
<itemStack oreDictionary="pearlEnderEye" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotMelodicAlloy" number="1" exp="1" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Stellar Alloy" energyCost="20000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="itemNetherStar" />
|
||||
<itemStack oreDictionary="ingotMelodicAlloy" />
|
||||
<itemStack oreDictionary="itemClay" number="4" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotStellarAlloy" number="2" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Crystalline Pink Slime" energyCost="10000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="slimeballPink" number="2" />
|
||||
<itemStack oreDictionary="itemPulsatingPowder" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotCrystallinePinkSlime" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Energetic Silver" energyCost="10000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="ingotSilver" />
|
||||
<itemStack oreDictionary="dustRedstone" />
|
||||
<itemStack oreDictionary="dustGlowstone" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotEnergeticSilver" number="1" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Vivid Alloy" energyCost="10000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="ingotEnergeticSilver" number="1" />
|
||||
<itemStack oreDictionary="pearlEnder" number="1" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack oreDictionary="ingotVividAlloy" number="1" />
|
||||
</output>
|
||||
</recipe>
|
||||
</recipeGroup>
|
||||
|
||||
<vanillaFurnaceRecipes enabled="true" />
|
||||
|
||||
</AlloySmelterRecipes>
|
||||
|
||||
@@ -3035,6 +3035,36 @@
|
||||
<grindingBall id="EndSteelBall" grindingMultiplier="1.4" chanceMultiplier="2.4" powerMultiplier="0.7" durationRF="75000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBall" itemMeta="8" />
|
||||
</grindingBall>
|
||||
|
||||
<!-- Endergy Balls !-->
|
||||
|
||||
<grindingBall id="CrudeSteelBall" grindingMultiplier="1.2" chanceMultiplier="1.25" powerMultiplier="0.85" durationRF="24000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="0" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="CrystallineAlloyBall" grindingMultiplier="1.8" chanceMultiplier="1.4" powerMultiplier="1.45" durationRF="80000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="1" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="MelodicAlloyBall" grindingMultiplier="2.0" chanceMultiplier="1.45" powerMultiplier="1.55" durationRF="80000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="2" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="StellarAlloyBall" grindingMultiplier="2.3" chanceMultiplier="2.25" powerMultiplier="2.2" durationRF="160000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="3" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="CrystallinePinkSlimeBall" grindingMultiplier="1.75" chanceMultiplier="1.55" powerMultiplier="1.55" durationRF="80000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="4" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="EnergeticSilverBall" grindingMultiplier="1.6" chanceMultiplier="1.1" powerMultiplier="1.1" durationRF="80000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="5" />
|
||||
</grindingBall>
|
||||
|
||||
<grindingBall id="VividAlloyBall" grindingMultiplier="1.75" chanceMultiplier="1.35" powerMultiplier="1.35" durationRF="80000" >
|
||||
<itemStack modID="EnderIO" itemName="itemGrindingBallEndergy" itemMeta="6" />
|
||||
</grindingBall>
|
||||
|
||||
<excludes>
|
||||
<itemStack modID="minecraft" itemName="glowstone" />
|
||||
|
||||
@@ -87,6 +87,19 @@
|
||||
<output>
|
||||
<itemStack modID="EnderIO" itemName="itemFrankenSkull" itemMeta="6" />
|
||||
</output>
|
||||
</recipe>
|
||||
<recipe name="Totemic Capacitor" energyCost="20000" >
|
||||
<input>
|
||||
<itemStack oreDictionary="ingotSoularium" slot="0" />
|
||||
<itemStack modID="minecraft" itemName="golden_apple" itemMeta="1" slot="1" />
|
||||
<itemStack oreDictionary="ingotSoularium" slot="2" />
|
||||
<itemStack oreDictionary="itemVibrantPowder" slot="3" />
|
||||
<itemStack oreDictionary="capacitorCrystalline" slot="4" />
|
||||
<itemStack oreDictionary="itemVibrantPowder" slot="5" />
|
||||
</input>
|
||||
<output>
|
||||
<itemStack modID="EnderIO" itemName="itemBasicCapacitor" itemMeta="6" />
|
||||
</output>
|
||||
</recipe>
|
||||
</recipeGroup>
|
||||
|
||||
|
||||
@@ -33,6 +33,19 @@ enderio.itemPowerConduit.name=Energy Conduit
|
||||
enderio.itemPowerConduitEnhanced.name=Enhanced Energy Conduit
|
||||
enderio.itemPowerConduitEnder.name=Ender Energy Conduit
|
||||
|
||||
enderio.itemPowerConduitEndergyCrude.name=Clay Compound Energy Conduit
|
||||
enderio.itemPowerConduitEndergyIron.name=Iron Energy Conduit
|
||||
enderio.itemPowerConduitEndergyAluminum.name=Aluminum Energy Conduit
|
||||
enderio.itemPowerConduitEndergyGold.name=Gold Energy Conduit
|
||||
enderio.itemPowerConduitEndergyCopper.name=Copper Energy Conduit
|
||||
enderio.itemPowerConduitEndergySilver.name=Silver Energy Conduit
|
||||
enderio.itemPowerConduitEndergyElectrum.name=Electrum Energy Conduit
|
||||
enderio.itemPowerConduitEndergyEnergeticSilver.name=Energetic Silver Energy Conduit
|
||||
enderio.itemPowerConduitEndergyCrystalline.name=Crystalline Energy Conduit
|
||||
enderio.itemPowerConduitEndergyCrystallinePinkSlime.name=Crystalline Pink Slime Energy Conduit
|
||||
enderio.itemPowerConduitEndergyMelodic.name=Melodic Energy Conduit
|
||||
enderio.itemPowerConduitEndergyStellar.name=Stellar Energy Conduit
|
||||
|
||||
enderio.itemRedstoneConduit.name=Redstone Conduit
|
||||
enderio.itemRedstoneConduitSwitch.name=Conduit Switch
|
||||
enderio.itemRedstoneConduitInsulated.name=Insulated Redstone Conduit
|
||||
@@ -61,7 +74,6 @@ enderio.filterUpgradeAdvanced.name=Advanced Item Filter
|
||||
enderio.filterUpgradeBig.name=Big Item Filter
|
||||
enderio.filterUpgradeBigAdvanced.name=Big Advanced Item Filter
|
||||
enderio.itemConduitFilterUpgrade=Upgrade for item conduits
|
||||
|
||||
enderio.itemConduitFilterUpgrade.configured=Configured
|
||||
enderio.itemConduitFilterUpgrade.clearConfigMethod=Place in crafting grid to clear
|
||||
enderio.itemConduitFilterUpgrade.clearConfigWarning=This will clear all stored filter settings!
|
||||
@@ -255,7 +267,7 @@ enderio.soularium.name=Soularium
|
||||
enderio.endSteel.name=End Steel
|
||||
enderio.endSteelNugget.name=End Steel Nugget
|
||||
|
||||
enderio.crudeSteel.name=Crude Steel
|
||||
enderio.crudeSteel.name=Clay Compound
|
||||
enderio.crystallineAlloy.name=Crystalline Alloy
|
||||
enderio.melodicAlloy.name=Melodic Alloy
|
||||
enderio.stellarAlloy.name=Stellar Alloy
|
||||
@@ -263,7 +275,7 @@ enderio.crystallinePinkSlime.name=Crystalline Pink Slime
|
||||
enderio.energeticSilver.name=Energetic Silver
|
||||
enderio.vividAlloy.name=Vivid Alloy
|
||||
|
||||
enderio.crudeSteelGrindingBall.name=Crude Steel Grinding Ball
|
||||
enderio.crudeSteelGrindingBall.name=Clay Compound Grinding Ball
|
||||
enderio.crystallineAlloyGrindingBall.name=Crystalline Alloy Grinding Ball
|
||||
enderio.melodicAlloyGrindingBall.name=Melodic Alloy Grinding Ball
|
||||
enderio.stellarAlloyGrindingBall.name=Stellar Alloy Grinding Ball
|
||||
@@ -301,7 +313,7 @@ tile.enderio.darkSteel.name=Dark Steel Block
|
||||
tile.enderio.soularium.name=Soularium Block
|
||||
tile.enderio.endSteel.name=End Steel Block
|
||||
|
||||
tile.enderio.crudeSteel.name=Crude Steel Block
|
||||
tile.enderio.crudeSteel.name=Clay Compound Block
|
||||
tile.enderio.crystallineAlloy.name=Crystalline Alloy Block
|
||||
tile.enderio.melodicAlloy.name=Melodic Alloy Block
|
||||
tile.enderio.stellarAlloy.name=Stellar Alloy Block
|
||||
@@ -324,7 +336,13 @@ enderio.itemBasicCapacitor.name=Capacitor
|
||||
enderio.basicCapacitor.name=Basic Capacitor
|
||||
enderio.activatedCapacitor.name=Double-Layer Capacitor
|
||||
enderio.enderCapacitor.name=Octadic Capacitor
|
||||
enderio.crystallineCapacitor.name=Crystalline Capacitor
|
||||
enderio.melodicCapacitor.name=Melodic Capacitor
|
||||
enderio.stellarCapacitor.name=Stellar Capacitor
|
||||
enderio.silverCapacitor.name=Silver Capacitor
|
||||
enderio.endergeticCapacitor.name=Endergetic Capacitor
|
||||
enderio.endergisedCapacitor.name=Endergised Capacitor
|
||||
enderio.totemicCapacitor.name=Totemic Capacitor
|
||||
|
||||
enderio.machine.tooltip.upgrade=Machine Upgrade
|
||||
enderio.machine.tooltip.upgrade.tooltip.detailed.line1=Increases energy storage and
|
||||
@@ -804,6 +822,15 @@ item.endSteel_sword.name=The Ender MKII
|
||||
item.endSteel_pickaxe.name=End Steel Pick
|
||||
item.endSteel_axe.name=End Steel Axe
|
||||
|
||||
//Stellar
|
||||
item.stellar_helmet.name=Stellar Helm
|
||||
item.stellar_chestplate.name=Stellar Plate
|
||||
item.stellar_leggings.name=Stellar Leggings
|
||||
item.stellar_boots.name=Stellar Boots
|
||||
item.stellar_sword.name=The Ender MKIV
|
||||
item.stellar_pickaxe.name=Stellar Pick
|
||||
item.stellar_axe.name=Stellar Axe
|
||||
|
||||
enderio.item.darkSteel.tooltip.lvs=lvs
|
||||
|
||||
enderio.item.darkSteel_pickaxe.tooltip.effPowered=Efficiency when powered
|
||||
@@ -814,9 +841,13 @@ enderio.item.endSteel_pickaxe.tooltip.effPowered=Efficiency when powered
|
||||
enderio.item.endSteel_pickaxe.tooltip.effObs=Efficiency breaking obsidian
|
||||
enderio.item.endSteel_pickaxe.tooltip.cost=cost
|
||||
|
||||
enderio.item.stellar_pickaxe.tooltip.effPowered=Efficiency when powered
|
||||
enderio.item.stellar_pickaxe.tooltip.effObs=Efficiency breaking obsidian
|
||||
enderio.item.stellar_pickaxe.tooltip.cost=cost
|
||||
|
||||
enderio.item.darkSteel_axe.tooltip.multiHarvest=Sneak to harvest multiple logs
|
||||
enderio.item.endSteel_axe.tooltip.multiHarvest=Sneak to harvest multiple logs
|
||||
|
||||
enderio.item.stellar_axe.tooltip.multiHarvest=Sneak to harvest multiple logs
|
||||
|
||||
enderio.item.darkSteel_shears.tooltip.multiHarvest=Shears multiple blocks/sheep when empowered
|
||||
|
||||
@@ -828,18 +859,28 @@ enderio.item.endSteel_sword.tooltip.line1=Increased skull and ender pearl drops
|
||||
enderio.item.endSteel_sword.tooltip.line2=Endermen can't teleport once hit
|
||||
enderio.item.endSteel_sword.tooltip.line3=+2 Damage when Powered
|
||||
|
||||
enderio.item.stellar_sword.tooltip.line1=Increased skull and ender pearl drops
|
||||
enderio.item.stellar_sword.tooltip.line2=Endermen can't teleport once hit
|
||||
enderio.item.stellar_sword.tooltip.line3=+2 Damage when Powered
|
||||
|
||||
enderio.item.darkSteel_armor.tooltip.line1=Diamond level protection
|
||||
enderio.item.darkSteel_armor.tooltip.line2=when powered
|
||||
|
||||
enderio.item.endSteel_armor.tooltip.line1=Diamond+ level protection
|
||||
enderio.item.endSteel_armor.tooltip.line2=when powered
|
||||
|
||||
enderio.item.stellar_armor.tooltip.line1=Diamond+ level protection
|
||||
enderio.item.stellar_armor.tooltip.line2=when powered
|
||||
|
||||
enderio.item.darkSteel_boots.tooltip.line1=Fall damage negated
|
||||
enderio.item.darkSteel_boots.tooltip.line2=when powered
|
||||
|
||||
enderio.item.endSteel_boots.tooltip.line1=Fall damage negated
|
||||
enderio.item.endSteel_boots.tooltip.line2=when powered
|
||||
|
||||
enderio.item.stellar_boots.tooltip.line1=Fall damage negated
|
||||
enderio.item.stellar_boots.tooltip.line2=when powered
|
||||
|
||||
enderio.darksteel.upgrade.empowered_one.name=Empowered
|
||||
enderio.darksteel.upgrade.empowered_one.tooltip.detailed.line1=Power: $P
|
||||
enderio.darksteel.upgrade.empowered_one.tooltip.detailed.line2=$D% damage absorbed
|
||||
|
||||
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 656 B |
|
After Width: | Height: | Size: 1005 B |
|
After Width: | Height: | Size: 1005 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 936 B |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1013 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 968 B |
|
After Width: | Height: | Size: 1019 B |
|
After Width: | Height: | Size: 702 B |
|
After Width: | Height: | Size: 649 B |
|
After Width: | Height: | Size: 676 B |
|
After Width: | Height: | Size: 669 B |
|
After Width: | Height: | Size: 707 B |
|
After Width: | Height: | Size: 689 B |
|
After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 651 B |
|
After Width: | Height: | Size: 663 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 392 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 1005 B |
|
After Width: | Height: | Size: 1005 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 936 B |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1013 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 968 B |
|
After Width: | Height: | Size: 1019 B |
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 371 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 556 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 561 B |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 418 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -49,6 +49,7 @@ import crazypants.enderio.conduit.oc.OCConduitRenderer;
|
||||
import crazypants.enderio.conduit.oc.OCUtil;
|
||||
import crazypants.enderio.conduit.power.PowerConduit;
|
||||
import crazypants.enderio.conduit.power.PowerConduitRenderer;
|
||||
import crazypants.enderio.conduit.power.endergy.PowerConduitEndergy;
|
||||
import crazypants.enderio.conduit.redstone.InsulatedRedstoneConduit;
|
||||
import crazypants.enderio.conduit.redstone.InsulatedRedstoneConduitRenderer;
|
||||
import crazypants.enderio.conduit.redstone.RedstoneConduit;
|
||||
@@ -208,6 +209,7 @@ public class ClientProxy extends CommonProxy {
|
||||
InsulatedRedstoneConduit.initIcons();
|
||||
RedstoneSwitch.initIcons();
|
||||
PowerConduit.initIcons();
|
||||
PowerConduitEndergy.initIcons();
|
||||
LiquidConduit.initIcons();
|
||||
AdvancedLiquidConduit.initIcons();
|
||||
EnderLiquidConduit.initIcons();
|
||||
@@ -335,6 +337,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ItemConduitRenderer itemConRenderer = new ItemConduitRenderer();
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemLiquidConduit, itemConRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemPowerConduit, itemConRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemPowerConduitEndergy, itemConRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemRedstoneConduit, itemConRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemItemConduit, itemConRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(EnderIO.itemGasConduit, itemConRenderer);
|
||||
|
||||
@@ -56,6 +56,7 @@ import crazypants.enderio.conduit.liquid.ItemLiquidConduit;
|
||||
import crazypants.enderio.conduit.me.ItemMEConduit;
|
||||
import crazypants.enderio.conduit.oc.ItemOCConduit;
|
||||
import crazypants.enderio.conduit.power.ItemPowerConduit;
|
||||
import crazypants.enderio.conduit.power.endergy.ItemPowerConduitEndergy;
|
||||
import crazypants.enderio.conduit.redstone.ConduitBundledRedstoneProvider;
|
||||
import crazypants.enderio.conduit.redstone.InsulatedRedstoneConduit;
|
||||
import crazypants.enderio.conduit.redstone.ItemRedstoneConduit;
|
||||
@@ -240,6 +241,7 @@ public class EnderIO {
|
||||
public static ItemConduitFacade itemConduitFacade;
|
||||
public static ItemRedstoneConduit itemRedstoneConduit;
|
||||
public static ItemPowerConduit itemPowerConduit;
|
||||
public static ItemPowerConduitEndergy itemPowerConduitEndergy;
|
||||
public static ItemLiquidConduit itemLiquidConduit;
|
||||
public static ItemItemConduit itemItemConduit;
|
||||
public static ItemGasConduit itemGasConduit;
|
||||
@@ -443,6 +445,7 @@ public class EnderIO {
|
||||
|
||||
itemRedstoneConduit = ItemRedstoneConduit.create();
|
||||
itemPowerConduit = ItemPowerConduit.create();
|
||||
itemPowerConduitEndergy = ItemPowerConduitEndergy.create();
|
||||
itemLiquidConduit = ItemLiquidConduit.create();
|
||||
itemItemConduit = ItemItemConduit.create();
|
||||
itemGasConduit = ItemGasConduit.create();
|
||||
|
||||
@@ -24,6 +24,7 @@ public enum ModObject {
|
||||
|
||||
// Power
|
||||
itemPowerConduit,
|
||||
itemPowerConduitEndergy,
|
||||
|
||||
// Liquid
|
||||
itemLiquidConduit,
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import appeng.api.AEApi;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
@@ -20,8 +21,10 @@ import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
import crazypants.enderio.material.BlockFusedQuartz;
|
||||
import crazypants.enderio.material.FrankenSkull;
|
||||
import crazypants.enderio.material.Material;
|
||||
|
||||
import static crazypants.enderio.ModObject.blockPainter;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
@@ -35,6 +38,13 @@ public class ConduitRecipes {
|
||||
ItemStack fusedQuartz = new ItemStack(EnderIO.blockFusedQuartz, 1, 0);
|
||||
ItemStack fusedGlass = new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.GLASS.ordinal());
|
||||
|
||||
String crudeSteel = CRUDE_STEEL.getOreIngot();
|
||||
String energeticSilver = ENERGETIC_SILVER.getOreIngot();
|
||||
String crystallineAlloy = CRYSTALLINE_ALLOY.getOreIngot();
|
||||
String crystallinePinkSlime = CRYSTALLINE_PINK_SLIME.getOreIngot();
|
||||
String melodicAlloy = MELODIC_ALLOY.getOreIngot();
|
||||
String stellarAlloy = STELLAR_ALLOY.getOreIngot();
|
||||
|
||||
String electricalSteel = ELECTRICAL_STEEL.getOreIngot();
|
||||
String phasedGold = PHASED_GOLD.getOreIngot();
|
||||
String conductiveIron = CONDUCTIVE_IRON.getOreIngot();
|
||||
@@ -45,6 +55,7 @@ public class ConduitRecipes {
|
||||
String binder = CONDUIT_BINDER.oreDict;
|
||||
|
||||
ItemStack zombieController = new ItemStack(EnderIO.itemFrankenSkull, 1, FrankenSkull.ZOMBIE_CONTROLLER.ordinal());
|
||||
ItemStack skeletalContractor = new ItemStack(EnderIO.itemFrankenSkull, 1, FrankenSkull.SKELETAL_CONTRACTOR.ordinal());
|
||||
|
||||
//Recipes
|
||||
addShaped(new ItemStack(EnderIO.itemConduitFacade, 1, FacadeType.BASIC.ordinal()), "bbb", "b b", "bbb", 'b', binder);
|
||||
@@ -55,13 +66,92 @@ public class ConduitRecipes {
|
||||
addShaped(new ItemStack(EnderIO.itemLiquidConduit, numConduits, 0), "bbb", "###", "bbb", 'b', binder, '#', fusedGlass);
|
||||
addShaped(new ItemStack(EnderIO.itemLiquidConduit, numConduits, 1), "bbb", "###", "bbb", 'b', binder, '#', fusedQuartz);
|
||||
addShaped(new ItemStack(EnderIO.itemLiquidConduit, numConduits, 2), "bbb", "#p#", "bbb", 'b', binder, '#', fusedQuartz, 'p', phasedGold);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 0), "bbb", "###", "bbb", 'b', binder, '#', conductiveIron);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 1), "bbb", "###", "bbb", 'b', binder, '#', energeticGold);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 2), "bbb", "###", "bbb", 'b', binder, '#', phasedGold);
|
||||
addShaped(new ItemStack(EnderIO.itemRedstoneConduit, numConduits, 0), "###", '#', redstoneAlloy);
|
||||
addShaped(new ItemStack(EnderIO.itemRedstoneConduit, 1, 1), "lbl", "bcb", "lbl", 'b', binder, 'c', redstoneConduit, 'l', Blocks.lever);
|
||||
addShaped(new ItemStack(EnderIO.itemRedstoneConduit, numConduits, 2), "bbb", "###", "bbb", 'b', binder, '#', redstoneAlloy);
|
||||
|
||||
if(Config.useHardRecipes) {
|
||||
|
||||
ItemStack lastTier;
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 0), "bbb", "###", "bbb", 'b', binder, '#', crudeSteel);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 0);
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 1), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotIron");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 1);
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotAluminum")||OreDictionary.doesOreNameExist("ingotAluminium")) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 2), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotAluminum");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 2), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotAluminium");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 2);
|
||||
}
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 3), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotGold");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 3);
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotCopper") && OreDictionary.getOres("ingotCopper").size()>0) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 4), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotCopper");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 4);
|
||||
}
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 0), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', conductiveIron);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduit, 1, 0);
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotSilver")) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 5), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotSilver");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 5);
|
||||
}
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotElectrum")) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 6), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', "ingotElectrum");
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 6);
|
||||
}
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 1), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', energeticGold);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduit, 1, 1);
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotSilver")) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 7), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', energeticSilver);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 7);
|
||||
}
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 2), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', phasedGold);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduit, 1, 2);
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 8), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', crystallineAlloy);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 8);
|
||||
|
||||
if(OreDictionary.doesOreNameExist("slimeballPink")) {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 9), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', crystallinePinkSlime);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 9);
|
||||
}
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 10), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', melodicAlloy);
|
||||
lastTier = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, 10);
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 11), "b#b", "ccc", "b#b", 'c', lastTier, 'b', binder, '#', stellarAlloy);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 0), "bbb", "###", "bbb", 'b', binder, '#', conductiveIron);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 1), "bbb", "###", "bbb", 'b', binder, '#', energeticGold);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduit, numConduits, 2), "bbb", "###", "bbb", 'b', binder, '#', phasedGold);
|
||||
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 0), "bbb", "###", "bbb", 'b', binder, '#', crudeSteel);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 1), "bbb", "###", "bbb", 'b', binder, '#', "ingotIron");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 2), "bbb", "###", "bbb", 'b', binder, '#', "ingotAluminum");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 3), "bbb", "###", "bbb", 'b', binder, '#', "ingotGold");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 4), "bbb", "###", "bbb", 'b', binder, '#', "ingotCopper");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 5), "bbb", "###", "bbb", 'b', binder, '#', "ingotSilver");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 6), "bbb", "###", "bbb", 'b', binder, '#', "ingotElectrum");
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 7), "bbb", "###", "bbb", 'b', binder, '#', energeticSilver);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 8), "bbb", "###", "bbb", 'b', binder, '#', crystallineAlloy);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 9), "bbb", "###", "bbb", 'b', binder, '#', crystallinePinkSlime);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 10), "bbb", "###", "bbb", 'b', binder, '#', melodicAlloy);
|
||||
addShaped(new ItemStack(EnderIO.itemPowerConduitEndergy, numConduits, 11), "bbb", "###", "bbb", 'b', binder, '#', stellarAlloy);
|
||||
|
||||
}
|
||||
if (GasUtil.isGasConduitEnabled()) {
|
||||
addShaped(new ItemStack(EnderIO.itemGasConduit, numConduits, 0), "bbb", "#g#", "bbb", 'b', binder, '#', electricalSteel, 'g', fusedGlass);
|
||||
}
|
||||
@@ -78,6 +168,12 @@ public class ConduitRecipes {
|
||||
ItemStack advFilter = new ItemStack(EnderIO.itemBasicFilterUpgrade, 1, 1);
|
||||
addShaped(advFilter, "rpr", "pzp", "rpr", 'p', Items.paper, 'z', zombieController, 'r', "dustRedstone");
|
||||
|
||||
ItemStack bigFilter = new ItemStack(EnderIO.itemBigFilterUpgrade, 1, 0);
|
||||
addShaped(bigFilter, "opo", "psp", "opo", 'p', Items.paper, 's', skeletalContractor, 'o', "dustObsidian");
|
||||
|
||||
ItemStack bigAdvFilter = new ItemStack(EnderIO.itemBigFilterUpgrade, 1, 1);
|
||||
addShaped(bigAdvFilter, "eme", "mfm", "eme", 'm', melodicAlloy, 'f', bigFilter, 'e', END_STEEL.getOreIngot());
|
||||
|
||||
ItemStack modFilter = new ItemStack(EnderIO.itemModItemFilter, 1, 0);
|
||||
addShaped(modFilter, " p ", "pwp", " p ", 'p', Items.paper, 'w', EnderIO.itemYetaWench);
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ public class ExternalConnectionContainer extends ContainerEnder<InventoryUpgrade
|
||||
slotLocations.add(new Point(x, y));
|
||||
bgSlots.add(new GhostBackgroundItemSlot(EnderIO.itemBasicFilterUpgrade, slotInputFilterUpgrades));
|
||||
|
||||
x = 28;
|
||||
y = 47;
|
||||
x = 10;
|
||||
y = 83;
|
||||
slotSpeedUpgrades = addSlotToContainer(new Slot(getInv(), 0, x, y) {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
@@ -108,7 +108,7 @@ public class ExternalConnectionContainer extends ContainerEnder<InventoryUpgrade
|
||||
public Point getPlayerInventoryOffset() {
|
||||
return new Point(23, 113);
|
||||
}
|
||||
|
||||
|
||||
public void addFilterListener(FilterChangeListener list) {
|
||||
filterListeners.add(list);
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public class ExternalConnectionContainer extends ContainerEnder<InventoryUpgrade
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
return inventory.isItemValidForSlot(getSlotIndex(), par1ItemStack);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
package crazypants.enderio.conduit.gui.item;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.CycleButton;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.item.filter.FuzzyMode;
|
||||
import crazypants.enderio.conduit.item.filter.ItemFilter;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
|
||||
public class BigItemFilterGui implements IItemFilterGui {
|
||||
|
||||
private static final int ID_WHITELIST = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_NBT = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_META = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_ORE_DICT = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_STICKY = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_FUZZY = GuiExternalConnection.nextButtonId();
|
||||
|
||||
private final GuiContainerBaseEIO gui;
|
||||
|
||||
private final ToggleButton useMetaB;
|
||||
private final ToggleButton useNbtB;
|
||||
private final IconButton whiteListB;
|
||||
private final ToggleButton useOreDictB;
|
||||
private final ToggleButton stickyB;
|
||||
private final CycleButton<FuzzyMode> fuzzyB;
|
||||
|
||||
final boolean isAdvanced;
|
||||
final boolean isStickyModeAvailable;
|
||||
|
||||
private final IItemFilterContainer filterContainer;
|
||||
private final ItemFilter filter;
|
||||
|
||||
private int buttonIdOffset;
|
||||
private int xOffset;
|
||||
private int yOffset;
|
||||
|
||||
public BigItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable) {
|
||||
this(gui, filterContainer, isStickyModeAvailable, 32, 48, 0);
|
||||
}
|
||||
|
||||
public BigItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
|
||||
int xOffset, int yOffset,
|
||||
int buttonIdOffset) {
|
||||
this.gui = gui;
|
||||
this.isStickyModeAvailable = isStickyModeAvailable;
|
||||
this.filterContainer = filterContainer;
|
||||
this.xOffset = xOffset;
|
||||
this.yOffset = yOffset;
|
||||
this.buttonIdOffset = buttonIdOffset;
|
||||
|
||||
filter = filterContainer.getItemFilter();
|
||||
|
||||
isAdvanced = filter.isAdvanced();
|
||||
|
||||
int butLeft = xOffset + 92+ 54;
|
||||
int x = butLeft;
|
||||
int y = yOffset + 40;
|
||||
whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
|
||||
|
||||
y -= 20;
|
||||
useMetaB = new ToggleButton(gui, ID_META + buttonIdOffset, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
|
||||
useMetaB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchMetaData"));
|
||||
useMetaB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreMetaData"));
|
||||
useMetaB.setPaintSelectedBorder(false);
|
||||
|
||||
stickyB = new ToggleButton(gui, ID_STICKY + buttonIdOffset, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
|
||||
stickyB.setSelectedToolTip(EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled"));
|
||||
stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
|
||||
stickyB.setPaintSelectedBorder(false);
|
||||
|
||||
y -= 20;
|
||||
useOreDictB = new ToggleButton(gui, ID_ORE_DICT + buttonIdOffset, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
|
||||
useOreDictB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicEnabled"));
|
||||
useOreDictB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicDisabled"));
|
||||
useOreDictB.setPaintSelectedBorder(false);
|
||||
|
||||
y -= 20;
|
||||
useNbtB = new ToggleButton(gui, ID_NBT + buttonIdOffset, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
|
||||
useNbtB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchNBT"));
|
||||
useNbtB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreNBT"));
|
||||
useNbtB.setPaintSelectedBorder(false);
|
||||
|
||||
y -= 20;
|
||||
fuzzyB = new CycleButton(gui, ID_FUZZY + buttonIdOffset, x, y, FuzzyMode.class);
|
||||
}
|
||||
|
||||
public void createFilterSlots() {
|
||||
filter.createGhostSlots(gui.getGhostSlots(), xOffset+1, yOffset+1, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
sendFilterChange();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int x, int y, int par3) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateButtons() {
|
||||
ItemFilter activeFilter = filter;
|
||||
|
||||
if(isAdvanced) {
|
||||
useNbtB.onGuiInit();
|
||||
useNbtB.setSelected(activeFilter.isMatchNBT());
|
||||
|
||||
useOreDictB.onGuiInit();
|
||||
useOreDictB.setSelected(activeFilter.isUseOreDict());
|
||||
|
||||
if(isStickyModeAvailable) {
|
||||
stickyB.onGuiInit();
|
||||
stickyB.setSelected(activeFilter.isSticky());
|
||||
}
|
||||
|
||||
fuzzyB.onGuiInit();
|
||||
fuzzyB.setMode(activeFilter.getFuzzyMode());
|
||||
}
|
||||
|
||||
useMetaB.onGuiInit();
|
||||
useMetaB.setSelected(activeFilter.isMatchMeta());
|
||||
|
||||
whiteListB.onGuiInit();
|
||||
if(activeFilter.isBlacklist()) {
|
||||
whiteListB.setIcon(IconEIO.FILTER_BLACKLIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.blacklist"));
|
||||
} else {
|
||||
whiteListB.setIcon(IconEIO.FILTER_WHITELIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton guiButton) {
|
||||
|
||||
if(guiButton.id == ID_META + buttonIdOffset) {
|
||||
filter.setMatchMeta(useMetaB.isSelected());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_NBT + buttonIdOffset) {
|
||||
filter.setMatchNBT(useNbtB.isSelected());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_STICKY + buttonIdOffset) {
|
||||
filter.setSticky(stickyB.isSelected());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_ORE_DICT + buttonIdOffset) {
|
||||
filter.setUseOreDict(useOreDictB.isSelected());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_FUZZY + buttonIdOffset) {
|
||||
filter.setFuzzyMode(fuzzyB.getMode());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_WHITELIST + buttonIdOffset) {
|
||||
filter.setBlacklist(!filter.isBlacklist());
|
||||
sendFilterChange();
|
||||
}
|
||||
}
|
||||
|
||||
private void sendFilterChange() {
|
||||
updateButtons();
|
||||
filterContainer.onFilterChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deactivate() {
|
||||
useNbtB.detach();
|
||||
useMetaB.detach();
|
||||
useOreDictB.detach();
|
||||
whiteListB.detach();
|
||||
stickyB.detach();
|
||||
fuzzyB.detach();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
gui.bindGuiTexture(1);
|
||||
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset + 54, gui.getGuiTop() + yOffset, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset + 54, gui.getGuiTop() + yOffset + 20, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset + 20, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset + 54, gui.getGuiTop() + yOffset + 40, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset + 40, 0, 238, 18 * 5, 18);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
private final RedstoneModeButton rsB;
|
||||
private final ColorButton colorB;
|
||||
|
||||
|
||||
private ColorButton channelB;
|
||||
|
||||
boolean inOutShowIn = false;
|
||||
@@ -98,18 +98,18 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
nextFilterB = MultiIconButton.createRightArrowButton(gui, NEXT_FILTER_ID, x, y);
|
||||
|
||||
x = 66;
|
||||
x = 66;
|
||||
channelB = new ColorButton(gui, ID_CHANNEL, x, y);
|
||||
channelB.setColorIndex(0);
|
||||
channelB.setToolTipHeading(EnderIO.lang.localize("gui.conduit.item.channel"));
|
||||
|
||||
|
||||
filterUpgradeTooltip = new GuiToolTip(new Rectangle(x - 21 - 18 * 2, customTop + 3 + 16, 18, 18), EnderIO.lang.localize("gui.conduit.item.filterupgrade")) {
|
||||
@Override
|
||||
public boolean shouldDraw() {
|
||||
return !gui.getContainer().hasFilterUpgrades(isInputVisible()) && super.shouldDraw();
|
||||
}
|
||||
};
|
||||
speedUpgradeTooltip = new GuiToolTip(new Rectangle(x - 21 - 18, customTop + 3 + 16, 18, 18), EnderIO.lang.localize("gui.conduit.item.speedupgrade"), EnderIO.lang.localize("gui.conduit.item.speedupgrade2")) {
|
||||
speedUpgradeTooltip = new GuiToolTip(new Rectangle(x - 21 - 18*2, customTop + 3 + 16 + 36, 18, 18), EnderIO.lang.localize("gui.conduit.item.speedupgrade"), EnderIO.lang.localize("gui.conduit.item.speedupgrade2")) {
|
||||
@Override
|
||||
public boolean shouldDraw() {
|
||||
return !gui.getContainer().hasSpeedUpgrades() && super.shouldDraw();
|
||||
@@ -130,7 +130,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
x += channelB.getWidth() + 4;
|
||||
priLeft = x - 8;
|
||||
|
||||
|
||||
rsB = new RedstoneModeButton(gui, ID_REDSTONE_BUTTON, x, y, new IRedstoneModeControlable() {
|
||||
|
||||
@Override
|
||||
@@ -167,8 +167,8 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
loopB.setPaintSelectedBorder(false);
|
||||
|
||||
priorityTooltip = new GuiToolTip(new Rectangle(priLeft + 9, y, priWidth, 16), EnderIO.lang.localize("gui.conduit.item.priority"));
|
||||
|
||||
x = priLeft + priWidth + 9;
|
||||
|
||||
x = priLeft + priWidth + 9;
|
||||
priUpB = MultiIconButton.createAddButton(gui, ID_PRIORITY_UP, x, y);
|
||||
priDownB = MultiIconButton.createMinusButton(gui, ID_PRIORITY_DOWN, x, y+8);
|
||||
|
||||
@@ -212,7 +212,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
ConnectionMode mode = con.getConnectionMode(gui.getDir());
|
||||
if(mode == ConnectionMode.INPUT) {
|
||||
showInput = true;
|
||||
showInput = true;
|
||||
} else if(mode == ConnectionMode.OUTPUT) {
|
||||
showOutput = true;
|
||||
} else if(mode == ConnectionMode.IN_OUT) {
|
||||
@@ -257,7 +257,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
return;
|
||||
}
|
||||
boolean outputActive = (mode == ConnectionMode.IN_OUT && !inOutShowIn) || (mode == ConnectionMode.OUTPUT);
|
||||
|
||||
|
||||
if(!outputActive) {
|
||||
|
||||
rsB.onGuiInit();
|
||||
@@ -286,12 +286,12 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
priDownB.onGuiInit();
|
||||
gui.addToolTip(priorityTooltip);
|
||||
}
|
||||
|
||||
|
||||
int chanCol;
|
||||
if(!outputActive) {
|
||||
chanCol = itemConduit.getInputColor(gui.getDir()).ordinal();
|
||||
} else {
|
||||
chanCol = itemConduit.getOutputColor(gui.getDir()).ordinal();
|
||||
chanCol = itemConduit.getInputColor(gui.getDir()).ordinal();
|
||||
} else {
|
||||
chanCol = itemConduit.getOutputColor(gui.getDir()).ordinal();
|
||||
}
|
||||
channelB.onGuiInit();
|
||||
channelB.setColorIndex(chanCol);
|
||||
@@ -324,12 +324,12 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_CHANNEL) {
|
||||
|
||||
DyeColor col = DyeColor.values()[channelB.getColorIndex()];
|
||||
DyeColor col = DyeColor.values()[channelB.getColorIndex()];
|
||||
if(isInputVisible()) {
|
||||
itemConduit.setInputColor(gui.getDir(), col);
|
||||
} else {
|
||||
itemConduit.setOutputColor(gui.getDir(), col);
|
||||
}
|
||||
}
|
||||
sendFilterChange();
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int x, int y, int par3) {
|
||||
public void mouseClicked(int x, int y, int par3) {
|
||||
super.mouseClicked(x, y, par3);
|
||||
if(filterGui != null) {
|
||||
filterGui.mouseClicked(x, y, par3);
|
||||
@@ -351,7 +351,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
}
|
||||
|
||||
private boolean isInputVisible() {
|
||||
ConnectionMode mode = con.getConnectionMode(gui.getDir());
|
||||
ConnectionMode mode = con.getConnectionMode(gui.getDir());
|
||||
return (mode == ConnectionMode.IN_OUT && inOutShowIn) || (mode == ConnectionMode.INPUT);
|
||||
}
|
||||
|
||||
@@ -388,9 +388,9 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
//draw speed upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9 + 18, gui.getGuiTop() + 46, 94, 238, 18, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9, gui.getGuiTop() + 46 +18 +18, 94, 238, 18, 18);
|
||||
}
|
||||
|
||||
|
||||
//filter upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
gui.bindGuiTexture(1);
|
||||
|
||||
@@ -38,9 +38,9 @@ public class ItemBigItemFilter extends ItemBasicItemFilter {
|
||||
int damage = MathHelper.clamp_int(stack.getItemDamage(), 0, 1);
|
||||
ItemFilter filter;
|
||||
if(damage == 0) {
|
||||
filter = new ItemFilter(30,false);
|
||||
filter = new ItemFilterBig(24, false);
|
||||
} else {
|
||||
filter = new ItemFilter(30,true);
|
||||
filter = new ItemFilterBig(24, true);
|
||||
}
|
||||
if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("filter")) {
|
||||
filter.readFromNBT(stack.stackTagCompound.getCompoundTag("filter"));
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package crazypants.enderio.conduit.item.filter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.enderio.core.client.gui.widget.GhostSlot;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.gui.item.BasicItemFilterGui;
|
||||
import crazypants.enderio.conduit.gui.item.BigItemFilterGui;
|
||||
import crazypants.enderio.conduit.gui.item.IItemFilterGui;
|
||||
import crazypants.enderio.conduit.gui.item.ItemConduitFilterContainer;
|
||||
import crazypants.enderio.conduit.item.IItemConduit;
|
||||
|
||||
public class ItemFilterBig extends ItemFilter {
|
||||
|
||||
public ItemFilterBig() {
|
||||
this(24,false);
|
||||
}
|
||||
|
||||
public ItemFilterBig(int numItems, boolean isAdvanced) {
|
||||
super(numItems, isAdvanced);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "Big Item Filter";
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IItemFilterGui getGui(GuiExternalConnection gui, IItemConduit itemConduit, boolean isInput) {
|
||||
ItemConduitFilterContainer cont = new ItemConduitFilterContainer(itemConduit, gui.getDir(), isInput);
|
||||
BigItemFilterGui bigItemFilterGui = new BigItemFilterGui(gui, cont, !isInput);
|
||||
bigItemFilterGui.createFilterSlots();
|
||||
return bigItemFilterGui;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createGhostSlots(List<GhostSlot> slots, int xOffset, int yOffset, Runnable cb) {
|
||||
int topY = yOffset;
|
||||
int leftX = xOffset;
|
||||
int index = 0;
|
||||
int numRows = (int) Math.ceil(items.length/8);
|
||||
for (int row = 0; row < numRows; ++row) {
|
||||
for (int col = 0; col < 8; ++col) {
|
||||
int x = leftX + col * 18;
|
||||
int y = topY + row * 20;
|
||||
slots.add(new ItemFilterGhostSlot(index, x, y, cb));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotCount() {
|
||||
return getSizeInventory();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// return "ItemFilter [isBlacklist=" + isBlacklist + ", matchMeta=" + matchMeta + ", matchNBT=" + matchNBT + ", useOreDict=" + useOreDict + ", sticky="
|
||||
// + sticky + ", items=" + Arrays.toString(items) + ", oreIds=" + Arrays.toString(oreIds) + ", isAdvanced=" + isAdvanced + "]";
|
||||
return "Big"+super.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,8 +23,6 @@ public class ItemPowerConduit extends AbstractItemConduit {
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduit.name(), "enderio:itemPowerConduit"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Enhanced", "enderio:itemPowerConduitEnhanced"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Ender", "enderio:itemPowerConduitEnder"),
|
||||
// new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Stellar", "enderio:itemPowerConduitStellar")
|
||||
|
||||
};
|
||||
|
||||
public static ItemPowerConduit create() {
|
||||
@@ -37,6 +35,10 @@ public class ItemPowerConduit extends AbstractItemConduit {
|
||||
super(ModObject.itemPowerConduit, subtypes);
|
||||
}
|
||||
|
||||
protected ItemPowerConduit(ModObject modObject, ItemConduitSubtype[] subtypes) {
|
||||
super(modObject, subtypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IConduit> getBaseConduitType() {
|
||||
return IPowerConduit.class;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
|
||||
|
||||
private static ICapacitor[] capacitors;
|
||||
|
||||
static final String[] POSTFIX = new String[] { "", "Enhanced", "Ender", /*"Stellar"*/};
|
||||
static final String[] POSTFIX = new String[] { "", "Enhanced", "Ender"};
|
||||
|
||||
static ICapacitor[] getCapacitors() {
|
||||
if(capacitors == null) {
|
||||
@@ -58,7 +58,6 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
|
||||
new BasicCapacitor(Config.powerConduitTierOneRF, Config.powerConduitTierOneRF),
|
||||
new BasicCapacitor(Config.powerConduitTierTwoRF, Config.powerConduitTierTwoRF),
|
||||
new BasicCapacitor(Config.powerConduitTierThreeRF, Config.powerConduitTierThreeRF),
|
||||
// new BasicCapacitor(Config.powerConduitTierFourRF, Config.powerConduitTierFourRF)
|
||||
};
|
||||
}
|
||||
return capacitors;
|
||||
@@ -76,8 +75,8 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (String pf : POSTFIX) {
|
||||
ICONS.put(ICON_KEY + pf, register.registerIcon(ICON_KEY + pf));
|
||||
ICONS.put(ICON_KEY_INPUT + pf, register.registerIcon(ICON_KEY_INPUT + pf));
|
||||
ICONS.put(ICON_KEY_OUTPUT + pf, register.registerIcon(ICON_KEY_OUTPUT + pf));
|
||||
ICONS.put(ICON_KEY_INPUT + pf, register.registerIcon(ICON_KEY_INPUT));
|
||||
ICONS.put(ICON_KEY_OUTPUT + pf, register.registerIcon(ICON_KEY_OUTPUT));
|
||||
ICONS.put(ICON_CORE_KEY + pf, register.registerIcon(ICON_CORE_KEY + pf));
|
||||
}
|
||||
ICONS.put(ICON_TRANSMISSION_KEY, register.registerIcon(ICON_TRANSMISSION_KEY));
|
||||
@@ -503,12 +502,12 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
|
||||
|
||||
@Override
|
||||
public IIcon getTextureForInputMode() {
|
||||
return ICONS.get(ICON_KEY_INPUT + POSTFIX[subtype]);
|
||||
return ICONS.get(ICON_KEY_INPUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getTextureForOutputMode() {
|
||||
return ICONS.get(ICON_KEY_OUTPUT + POSTFIX[subtype]);
|
||||
return ICONS.get(ICON_KEY_OUTPUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,7 @@ public class PowerConduitNetwork extends AbstractConduitNetwork<IPowerConduit, I
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
NetworkPowerManager powerManager;
|
||||
public NetworkPowerManager powerManager;
|
||||
|
||||
private final Map<ReceptorKey, ReceptorEntry> powerReceptors = new HashMap<ReceptorKey, ReceptorEntry>();
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package crazypants.enderio.conduit.power.endergy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.conduit.AbstractItemConduit;
|
||||
import crazypants.enderio.conduit.IConduit;
|
||||
import crazypants.enderio.conduit.ItemConduitSubtype;
|
||||
import crazypants.enderio.conduit.power.IPowerConduit;
|
||||
import crazypants.enderio.conduit.power.ItemPowerConduit;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
|
||||
public class ItemPowerConduitEndergy extends ItemPowerConduit {
|
||||
|
||||
private static String PREFIX;
|
||||
private static String POSTFIX;
|
||||
|
||||
static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Crude", "enderio:itemPowerConduitCrude"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Iron", "enderio:itemPowerConduitIron"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Aluminum", "enderio:itemPowerConduitAluminum"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Gold", "enderio:itemPowerConduitGold"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Copper", "enderio:itemPowerConduitCopper"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Silver", "enderio:itemPowerConduitSilver"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Electrum", "enderio:itemPowerConduitElectrum"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "EnergeticSilver", "enderio:itemPowerConduitEnergeticSilver"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Crystalline", "enderio:itemPowerConduitCrystalline"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "CrystallinePinkSlime", "enderio:itemPowerConduitCrystallinePinkSlime"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Melodic", "enderio:itemPowerConduitMelodic"),
|
||||
new ItemConduitSubtype(ModObject.itemPowerConduitEndergy.name() + "Stellar", "enderio:itemPowerConduitStellar"),
|
||||
|
||||
};
|
||||
|
||||
public static ItemPowerConduitEndergy create() {
|
||||
ItemPowerConduitEndergy result = new ItemPowerConduitEndergy();
|
||||
result.init();
|
||||
return result;
|
||||
}
|
||||
|
||||
protected ItemPowerConduitEndergy() {
|
||||
super(ModObject.itemPowerConduitEndergy, subtypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IConduit> getBaseConduitType() {
|
||||
return IPowerConduit.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConduit createConduit(ItemStack stack, EntityPlayer player) {
|
||||
return new PowerConduitEndergy(stack.getItemDamage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||
if(PREFIX == null) {
|
||||
POSTFIX = " " + PowerDisplayUtil.abrevation() + PowerDisplayUtil.perTickStr();
|
||||
PREFIX = EnderIO.lang.localize("power.maxOutput") + " ";
|
||||
}
|
||||
ICapacitor cap = PowerConduitEndergy.getCapacitors()[itemStack.getItemDamage()];
|
||||
list.add(PREFIX + PowerDisplayUtil.formatPower(cap.getMaxEnergyExtracted()) + POSTFIX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldHideFacades(ItemStack stack, EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,559 @@
|
||||
package crazypants.enderio.conduit.power.endergy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.enderio.core.client.render.BoundingBox;
|
||||
import com.enderio.core.client.render.IconUtil;
|
||||
import com.enderio.core.common.util.DyeColor;
|
||||
import com.enderio.core.common.vecmath.Vector3d;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.AbstractConduit;
|
||||
import crazypants.enderio.conduit.AbstractConduitNetwork;
|
||||
import crazypants.enderio.conduit.ConduitUtil;
|
||||
import crazypants.enderio.conduit.ConnectionMode;
|
||||
import crazypants.enderio.conduit.IConduit;
|
||||
import crazypants.enderio.conduit.IConduitBundle;
|
||||
import crazypants.enderio.conduit.RaytraceResult;
|
||||
import crazypants.enderio.conduit.geom.CollidableCache.CacheKey;
|
||||
import crazypants.enderio.conduit.geom.CollidableComponent;
|
||||
import crazypants.enderio.conduit.geom.ConduitGeometryUtil;
|
||||
import crazypants.enderio.conduit.power.IPowerConduit;
|
||||
import crazypants.enderio.conduit.power.PowerConduit;
|
||||
import crazypants.enderio.conduit.power.PowerConduitNetwork;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.item.PacketConduitProbe;
|
||||
import crazypants.enderio.machine.RedstoneControlMode;
|
||||
import crazypants.enderio.power.BasicCapacitor;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
import crazypants.enderio.power.IPowerInterface;
|
||||
import crazypants.enderio.power.PowerHandlerUtil;
|
||||
import crazypants.enderio.tool.ToolUtil;
|
||||
|
||||
import static crazypants.enderio.config.Config.powerConduitEndergyTiers;
|
||||
|
||||
public class PowerConduitEndergy extends PowerConduit {
|
||||
|
||||
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
|
||||
|
||||
private static ICapacitor[] capacitors;
|
||||
|
||||
static final String[] POSTFIX = new String[] { "Crude", "Iron", "Aluminum", "Gold", "Copper", "Silver", "Electrum", "EnergeticSilver", "Crystalline", "CrystallinePinkSlime", "Melodic", "Stellar"};
|
||||
|
||||
static ICapacitor[] getCapacitors() {
|
||||
if(capacitors == null) {
|
||||
capacitors = new BasicCapacitor[] {
|
||||
|
||||
new BasicCapacitor(powerConduitEndergyTiers[0]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[1]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[2]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[3]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[4]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[5]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[6]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[7]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[8]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[9]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[10]),
|
||||
new BasicCapacitor(powerConduitEndergyTiers[11])
|
||||
};
|
||||
}
|
||||
return capacitors;
|
||||
}
|
||||
|
||||
static ItemStack createItemStackForSubtype(int subtype) {
|
||||
ItemStack result = new ItemStack(EnderIO.itemPowerConduitEndergy, 1, subtype);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void initIcons() {
|
||||
IconUtil.addIconProvider(new IconUtil.IIconProvider() {
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (String pf : POSTFIX) {
|
||||
ICONS.put(ICON_KEY + pf, register.registerIcon(ICON_KEY + pf));
|
||||
ICONS.put(ICON_KEY_INPUT + pf, register.registerIcon(ICON_KEY_INPUT));
|
||||
ICONS.put(ICON_KEY_OUTPUT + pf, register.registerIcon(ICON_KEY_OUTPUT));
|
||||
ICONS.put(ICON_CORE_KEY + pf, register.registerIcon(ICON_CORE_KEY + pf));
|
||||
}
|
||||
ICONS.put(ICON_TRANSMISSION_KEY, register.registerIcon(ICON_TRANSMISSION_KEY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTextureType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public static final float WIDTH = 0.075f;
|
||||
public static final float HEIGHT = 0.075f;
|
||||
|
||||
public static final Vector3d MIN = new Vector3d(0.5f - WIDTH, 0.5 - HEIGHT, 0.5 - WIDTH);
|
||||
public static final Vector3d MAX = new Vector3d(MIN.x + WIDTH, MIN.y + HEIGHT, MIN.z + WIDTH);
|
||||
|
||||
public static final BoundingBox BOUNDS = new BoundingBox(MIN, MAX);
|
||||
|
||||
protected PowerConduitNetwork network;
|
||||
|
||||
private int energyStoredRF;
|
||||
|
||||
private int subtype;
|
||||
|
||||
protected final EnumMap<ForgeDirection, RedstoneControlMode> rsModes = new EnumMap<ForgeDirection, RedstoneControlMode>(ForgeDirection.class);
|
||||
protected final EnumMap<ForgeDirection, DyeColor> rsColors = new EnumMap<ForgeDirection, DyeColor>(ForgeDirection.class);
|
||||
|
||||
protected EnumMap<ForgeDirection, Long> recievedTicks;
|
||||
|
||||
private final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<ForgeDirection, Integer>();
|
||||
|
||||
private boolean redstoneStateDirty = true;
|
||||
|
||||
public PowerConduitEndergy() {
|
||||
}
|
||||
|
||||
public PowerConduitEndergy(int meta) {
|
||||
this.subtype = meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getConnectionsDirty() {
|
||||
return connectionsDirty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(EntityPlayer player, RaytraceResult res, List<RaytraceResult> all) {
|
||||
DyeColor col = DyeColor.getColorFromDye(player.getCurrentEquippedItem());
|
||||
if(ConduitUtil.isProbeEquipped(player)) {
|
||||
if(!player.worldObj.isRemote) {
|
||||
new PacketConduitProbe().sendInfoMessage(player, this);
|
||||
}
|
||||
return true;
|
||||
} else if(col != null && res.component != null && isColorBandRendered(res.component.dir)) {
|
||||
setExtractionSignalColor(res.component.dir, col);
|
||||
return true;
|
||||
} else if(ToolUtil.isToolEquipped(player)) {
|
||||
if(!getBundle().getEntity().getWorldObj().isRemote) {
|
||||
if(res != null && res.component != null) {
|
||||
ForgeDirection connDir = res.component.dir;
|
||||
ForgeDirection faceHit = ForgeDirection.getOrientation(res.movingObjectPosition.sideHit);
|
||||
if(connDir == ForgeDirection.UNKNOWN || connDir == faceHit) {
|
||||
if(getConnectionMode(faceHit) == ConnectionMode.DISABLED) {
|
||||
setConnectionMode(faceHit, getNextConnectionMode(faceHit));
|
||||
return true;
|
||||
}
|
||||
// Attempt to join networks
|
||||
return ConduitUtil.joinConduits(this, faceHit);
|
||||
} else if(externalConnections.contains(connDir)) {
|
||||
setConnectionMode(connDir, getNextConnectionMode(connDir));
|
||||
return true;
|
||||
} else if(containsConduitConnection(connDir)) {
|
||||
ConduitUtil.disconectConduits(this, connDir);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isColorBandRendered(ForgeDirection dir) {
|
||||
return getConnectionMode(dir) != ConnectionMode.DISABLED && getExtractionRedstoneMode(dir) != RedstoneControlMode.IGNORE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICapacitor getCapacitor() {
|
||||
return getCapacitors()[subtype];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtractionRedstoneMode(RedstoneControlMode mode, ForgeDirection dir) {
|
||||
rsModes.put(dir, mode);
|
||||
setClientStateDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedstoneControlMode getExtractionRedstoneMode(ForgeDirection dir) {
|
||||
RedstoneControlMode res = rsModes.get(dir);
|
||||
if(res == null) {
|
||||
res = RedstoneControlMode.IGNORE;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtractionSignalColor(ForgeDirection dir, DyeColor col) {
|
||||
rsColors.put(dir, col);
|
||||
setClientStateDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DyeColor getExtractionSignalColor(ForgeDirection dir) {
|
||||
DyeColor res = rsColors.get(dir);
|
||||
if(res == null) {
|
||||
res = DyeColor.RED;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readTypeSettings(ForgeDirection dir, NBTTagCompound dataRoot) {
|
||||
setExtractionSignalColor(dir, DyeColor.values()[dataRoot.getShort("extractionSignalColor")]);
|
||||
setExtractionRedstoneMode(RedstoneControlMode.values()[dataRoot.getShort("extractionRedstoneMode")], dir);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeTypeSettingsToNbt(ForgeDirection dir, NBTTagCompound dataRoot) {
|
||||
dataRoot.setShort("extractionSignalColor", (short)getExtractionSignalColor(dir).ordinal());
|
||||
dataRoot.setShort("extractionRedstoneMode", (short)getExtractionRedstoneMode(dir).ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtRoot) {
|
||||
super.writeToNBT(nbtRoot);
|
||||
nbtRoot.setShort("subtype", (short) subtype);
|
||||
nbtRoot.setInteger("energyStoredRF", energyStoredRF);
|
||||
|
||||
for (Entry<ForgeDirection, RedstoneControlMode> entry : rsModes.entrySet()) {
|
||||
if(entry.getValue() != null) {
|
||||
short ord = (short) entry.getValue().ordinal();
|
||||
nbtRoot.setShort("pRsMode." + entry.getKey().name(), ord);
|
||||
}
|
||||
}
|
||||
|
||||
for (Entry<ForgeDirection, DyeColor> entry : rsColors.entrySet()) {
|
||||
if(entry.getValue() != null) {
|
||||
short ord = (short) entry.getValue().ordinal();
|
||||
nbtRoot.setShort("pRsCol." + entry.getKey().name(), ord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbtRoot, short nbtVersion) {
|
||||
super.readFromNBT(nbtRoot, nbtVersion);
|
||||
subtype = nbtRoot.getShort("subtype");
|
||||
|
||||
if(nbtRoot.hasKey("energyStored")) {
|
||||
nbtRoot.setInteger("energyStoredRF", (int)(nbtRoot.getFloat("energyStored") * 10));
|
||||
|
||||
}
|
||||
setEnergyStored(nbtRoot.getInteger("energyStoredRF"));
|
||||
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
String key = "pRsMode." + dir.name();
|
||||
if(nbtRoot.hasKey(key)) {
|
||||
short ord = nbtRoot.getShort(key);
|
||||
if(ord >= 0 && ord < RedstoneControlMode.values().length) {
|
||||
rsModes.put(dir, RedstoneControlMode.values()[ord]);
|
||||
}
|
||||
}
|
||||
key = "pRsCol." + dir.name();
|
||||
if(nbtRoot.hasKey(key)) {
|
||||
short ord = nbtRoot.getShort(key);
|
||||
if(ord >= 0 && ord < DyeColor.values().length) {
|
||||
rsColors.put(dir, DyeColor.values()[ord]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored() {
|
||||
return energyStoredRF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnergyStored(int energyStored) {
|
||||
energyStoredRF = MathHelper.clamp_int(energyStored, 0, getMaxEnergyStored());
|
||||
}
|
||||
|
||||
|
||||
private boolean isRedstoneEnabled(ForgeDirection dir) {
|
||||
boolean result;
|
||||
RedstoneControlMode mode = getExtractionRedstoneMode(dir);
|
||||
if(mode == RedstoneControlMode.NEVER) {
|
||||
return false;
|
||||
}
|
||||
if(mode == RedstoneControlMode.IGNORE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
DyeColor col = getExtractionSignalColor(dir);
|
||||
int signal = ConduitUtil.getInternalSignalForColor(getBundle(), col);
|
||||
int exSig = getExternalRedstoneSignalForDir(dir);
|
||||
boolean res;
|
||||
if(mode == RedstoneControlMode.OFF) {
|
||||
//if checking for no signal, must be no signal from both
|
||||
res = mode.isConditionMet(mode, signal) && (col != DyeColor.RED || mode.isConditionMet(mode, exSig));
|
||||
} else {
|
||||
//if checking for a signal, either is fine
|
||||
res = mode.isConditionMet(mode, signal) || (col == DyeColor.RED && mode.isConditionMet(mode, exSig));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private int getExternalRedstoneSignalForDir(ForgeDirection dir) {
|
||||
if(redstoneStateDirty) {
|
||||
externalRedstoneSignals.clear();
|
||||
redstoneStateDirty = false;
|
||||
}
|
||||
Integer cached = externalRedstoneSignals.get(dir);
|
||||
int result;
|
||||
if(cached == null) {
|
||||
TileEntity te = getBundle().getEntity();
|
||||
result = te.getWorldObj().getStrongestIndirectPower(te.xCoord, te.yCoord, te.zCoord);
|
||||
externalRedstoneSignals.put(dir, result);
|
||||
} else {
|
||||
result = cached;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyRecieved(ForgeDirection dir) {
|
||||
ConnectionMode mode = getConnectionMode(dir);
|
||||
if(mode == ConnectionMode.OUTPUT || mode == ConnectionMode.DISABLED || !isRedstoneEnabled(dir)) {
|
||||
return 0;
|
||||
}
|
||||
return getCapacitor().getMaxEnergyReceived();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyExtracted(ForgeDirection dir) {
|
||||
ConnectionMode mode = getConnectionMode(dir);
|
||||
if(mode == ConnectionMode.INPUT || mode == ConnectionMode.DISABLED || !isRedstoneEnabled(dir)) {
|
||||
return 0;
|
||||
}
|
||||
if(recievedRfThisTick(dir)) {
|
||||
return 0;
|
||||
}
|
||||
return getCapacitor().getMaxEnergyExtracted();
|
||||
}
|
||||
|
||||
private boolean recievedRfThisTick(ForgeDirection dir) {
|
||||
if(recievedTicks == null || dir == null || recievedTicks.get(dir) == null || getBundle() == null || getBundle().getWorld() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
long curTick = getBundle().getWorld().getTotalWorldTime();
|
||||
long recT = recievedTicks.get(dir);
|
||||
if(curTick - recT <= 5) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNeighborBlockChange(Block blockId) {
|
||||
redstoneStateDirty = true;
|
||||
if(network != null && network.powerManager != null) {
|
||||
network.powerManager.receptorsChanged();
|
||||
}
|
||||
return super.onNeighborBlockChange(blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConnectionMode(ForgeDirection dir, ConnectionMode mode) {
|
||||
super.setConnectionMode(dir, mode);
|
||||
recievedTicks = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
if(getMaxEnergyRecieved(from) == 0 || maxReceive <= 0) {
|
||||
return 0;
|
||||
}
|
||||
int freeSpace = getMaxEnergyStored() - getEnergyStored();
|
||||
int result = (int) Math.min(maxReceive, freeSpace);
|
||||
if(!simulate && result > 0) {
|
||||
setEnergyStored(getEnergyStored() + result);
|
||||
|
||||
if(getBundle() != null) {
|
||||
if(recievedTicks == null) {
|
||||
recievedTicks = new EnumMap<ForgeDirection, Long>(ForgeDirection.class);
|
||||
}
|
||||
recievedTicks.put(from, getBundle().getWorld().getTotalWorldTime());
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectEnergy(ForgeDirection from) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ForgeDirection from) {
|
||||
return getEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from) {
|
||||
return getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractConduitNetwork<?, ?> getNetwork() {
|
||||
return network;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setNetwork(AbstractConduitNetwork<?, ?> network) {
|
||||
this.network = (PowerConduitNetwork) network;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectToExternal(ForgeDirection direction, boolean ignoreDisabled) {
|
||||
IPowerInterface rec = getExternalPowerReceptor(direction);
|
||||
|
||||
return rec != null && rec.canConduitConnect(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectToConduit(ForgeDirection direction, IConduit conduit) {
|
||||
boolean res = super.canConnectToConduit(direction, conduit);
|
||||
if(!res) {
|
||||
return false;
|
||||
}
|
||||
if(Config.powerConduitCanDifferentTiersConnect) {
|
||||
return res;
|
||||
}
|
||||
if( !(conduit instanceof IPowerConduit)) {
|
||||
return false;
|
||||
}
|
||||
IPowerConduit pc = (IPowerConduit)conduit;
|
||||
return pc.getMaxEnergyStored() == getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void externalConnectionAdded(ForgeDirection direction) {
|
||||
super.externalConnectionAdded(direction);
|
||||
if(network != null) {
|
||||
TileEntity te = bundle.getEntity();
|
||||
network.powerReceptorAdded(this, direction, te.xCoord + direction.offsetX, te.yCoord + direction.offsetY, te.zCoord + direction.offsetZ,
|
||||
getExternalPowerReceptor(direction));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void externalConnectionRemoved(ForgeDirection direction) {
|
||||
super.externalConnectionRemoved(direction);
|
||||
if(network != null) {
|
||||
TileEntity te = bundle.getEntity();
|
||||
network.powerReceptorRemoved(te.xCoord + direction.offsetX, te.yCoord + direction.offsetY, te.zCoord + direction.offsetZ);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPowerInterface getExternalPowerReceptor(ForgeDirection direction) {
|
||||
TileEntity te = bundle.getEntity();
|
||||
World world = te.getWorldObj();
|
||||
if(world == null) {
|
||||
return null;
|
||||
}
|
||||
TileEntity test = world.getTileEntity(te.xCoord + direction.offsetX, te.yCoord + direction.offsetY, te.zCoord + direction.offsetZ);
|
||||
if(test == null) {
|
||||
return null;
|
||||
}
|
||||
if(test instanceof IConduitBundle) {
|
||||
return null;
|
||||
}
|
||||
return PowerHandlerUtil.create(test);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack createItem() {
|
||||
return createItemStackForSubtype(subtype);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IConduit> getBaseConduitType() {
|
||||
return IPowerConduit.class;
|
||||
}
|
||||
|
||||
// Rendering
|
||||
@Override
|
||||
public IIcon getTextureForState(CollidableComponent component) {
|
||||
if(component.dir == ForgeDirection.UNKNOWN) {
|
||||
return ICONS.get(ICON_CORE_KEY + POSTFIX[subtype]);
|
||||
}
|
||||
if(COLOR_CONTROLLER_ID.equals(component.data)) {
|
||||
return IconUtil.whiteTexture;
|
||||
}
|
||||
return ICONS.get(ICON_KEY + POSTFIX[subtype]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getTextureForInputMode() {
|
||||
return ICONS.get(ICON_KEY_INPUT + POSTFIX[subtype]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getTextureForOutputMode() {
|
||||
return ICONS.get(ICON_KEY_OUTPUT + POSTFIX[subtype]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getTransmitionTextureForState(CollidableComponent component) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<CollidableComponent> createCollidables(CacheKey key) {
|
||||
Collection<CollidableComponent> baseCollidables = super.createCollidables(key);
|
||||
if(key.dir == ForgeDirection.UNKNOWN) {
|
||||
return baseCollidables;
|
||||
}
|
||||
|
||||
BoundingBox bb = ConduitGeometryUtil.instance.createBoundsForConnectionController(key.dir, key.offset);
|
||||
CollidableComponent cc = new CollidableComponent(IPowerConduit.class, bb, key.dir, COLOR_CONTROLLER_ID);
|
||||
|
||||
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
|
||||
result.addAll(baseCollidables);
|
||||
result.add(cc);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored() {
|
||||
return getCapacitors()[subtype].getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displayPower() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -283,6 +283,9 @@ public final class Config {
|
||||
public static int enderGeneratorRfPerTick = 360;
|
||||
public static int enderGeneratorTicksPerBucketFuel = 96000;
|
||||
|
||||
public static double[] zombieGeneratorsEnergyMultipliers = {1f,2f,3f,5f,8f,13f,21f};
|
||||
public static double[] zombieGeneratorsBurnTimeMultipliers = {0.5f,1f/1.5f};
|
||||
|
||||
public static int stirlingGeneratorBaseRfPerTick = 20;
|
||||
public static float stirlingGeneratorEnergyMultiplierT1 = 1f;
|
||||
public static float stirlingGeneratorEnergyMultiplierT2 = 2f;
|
||||
@@ -291,6 +294,10 @@ public final class Config {
|
||||
public static float stirlingGeneratorBurnTimeMultiplierT2 = 1f / 1.5f;
|
||||
public static float stirlingGeneratorBurnTimeMultiplierT3 = 1f / 1.5f;
|
||||
|
||||
public static double[] stirlingGeneratorEnergyMultipliers = {1f,2f,3f,5f,8f,13f,21f};
|
||||
public static double[] stirlingGeneratorBurnTimeMultipliers = {0.5f,1f/1.5f};
|
||||
|
||||
|
||||
public static boolean combustionGeneratorUseOpaqueModel = true;
|
||||
|
||||
public static boolean addFuelTooltipsToAllFluidContainers = true;
|
||||
@@ -442,7 +449,7 @@ public final class Config {
|
||||
public static int powerConduitTierOneRF = 640;
|
||||
public static int powerConduitTierTwoRF = 5120;
|
||||
public static int powerConduitTierThreeRF = 20480;
|
||||
//public static int powerConduitTierFourRF = 81920;
|
||||
public static int[] powerConduitEndergyTiers = {20, 40, 80, 160, 320, 1280, 2560, 10240, 40960, 81920, 327680, 2000000000};
|
||||
public static boolean powerConduitOutputMJ = true;
|
||||
|
||||
public static int sliceAndSpliceLevelOnePowerPerTickRF = 80;
|
||||
@@ -614,6 +621,9 @@ public final class Config {
|
||||
.getInt(powerConduitTierTwoRF);
|
||||
powerConduitTierThreeRF = config.get(sectionPower.name, "powerConduitTierThreeRF", powerConduitTierThreeRF, "The maximum IO for the tier 3 power conduit")
|
||||
.getInt(powerConduitTierThreeRF);
|
||||
powerConduitEndergyTiers = config.get(sectionPower.name, "powerConduitTiersEndergy", powerConduitEndergyTiers, "The maximum IO for the endergy power conduit")
|
||||
.getIntList();
|
||||
|
||||
powerConduitCanDifferentTiersConnect = config
|
||||
.getBoolean("powerConduitCanDifferentTiersConnect", sectionPower.name, powerConduitCanDifferentTiersConnect,
|
||||
"If set to false power conduits of different tiers cannot be connected. in this case a block such as a cap. bank is needed to bridge different tiered networks");
|
||||
@@ -1061,22 +1071,36 @@ public final class Config {
|
||||
enderGeneratorTicksPerBucketFuel = config.get(sectionPower.name, "enderGeneratorTicksPerMbFuel", enderGeneratorTicksPerBucketFuel,
|
||||
"The number of ticks one bucket of fuel lasts.").getInt(enderGeneratorTicksPerBucketFuel);
|
||||
|
||||
zombieGeneratorsEnergyMultipliers = config.get(sectionPower.name, "zombieGeneratorsEnergyMultipliers",
|
||||
zombieGeneratorsEnergyMultipliers, "Energy multipliers for the Zombie-Type Generators").getDoubleList();
|
||||
|
||||
zombieGeneratorsBurnTimeMultipliers = config.get(sectionPower.name, "zombieGeneratorsBurnTimeMultipliers",
|
||||
zombieGeneratorsBurnTimeMultipliers, "Burn time multipliers for the Zombie-Type Generators").getDoubleList();
|
||||
|
||||
|
||||
stirlingGeneratorBaseRfPerTick = config.get(sectionPower.name, "stirlingGeneratorBaseRfPerTick", stirlingGeneratorBaseRfPerTick,
|
||||
"The amount of power generated per tick.").getInt(stirlingGeneratorBaseRfPerTick);
|
||||
|
||||
stirlingGeneratorEnergyMultiplierT1 = (float) config.get(sectionPower.name, "stirlingGeneratorEnergyMultiplierT1",
|
||||
stirlingGeneratorEnergyMultiplierT1, "Energy multiplier for the Stirling Generator, Tier 1 machine").getDouble();
|
||||
stirlingGeneratorEnergyMultiplierT1, "[Deprecated]Energy multiplier for the Stirling Generator, Tier 1 machine").getDouble();
|
||||
stirlingGeneratorEnergyMultiplierT2 = (float) config.get(sectionPower.name, "stirlingGeneratorEnergyMultiplierT2",
|
||||
stirlingGeneratorEnergyMultiplierT2, "Energy multiplier for the Stirling Generator, Tier 2 machine").getDouble();
|
||||
stirlingGeneratorEnergyMultiplierT2, "[Deprecated]Energy multiplier for the Stirling Generator, Tier 2 machine").getDouble();
|
||||
stirlingGeneratorEnergyMultiplierT3 = (float) config.get(sectionPower.name, "stirlingGeneratorEnergyMultiplierT3",
|
||||
stirlingGeneratorEnergyMultiplierT3, "Energy multiplier for the Stirling Generator, Tier 3 machine").getDouble();
|
||||
stirlingGeneratorEnergyMultiplierT3, "[Deprecated]Energy multiplier for the Stirling Generator, Tier 3 machine").getDouble();
|
||||
|
||||
stirlingGeneratorEnergyMultipliers = config.get(sectionPower.name, "stirlingGeneratorEnergyMultipliers",
|
||||
stirlingGeneratorEnergyMultipliers, "Energy multipliers for the Stirling Generator").getDoubleList();
|
||||
|
||||
stirlingGeneratorBurnTimeMultiplierT1 = (float) config.get(sectionPower.name, "stirlingGeneratorBurnTimeMultiplierT1",
|
||||
stirlingGeneratorBurnTimeMultiplierT1, "Burn time multiplier for the Stirling Generator, Tier 1 machine").getDouble();
|
||||
stirlingGeneratorBurnTimeMultiplierT1, "[Deprecated]Burn time multiplier for the Stirling Generator, Tier 1 machine").getDouble();
|
||||
stirlingGeneratorBurnTimeMultiplierT2 = (float) config.get(sectionPower.name, "stirlingGeneratorBurnTimeMultiplierT2",
|
||||
stirlingGeneratorBurnTimeMultiplierT2, "Burn time multiplier for the Stirling Generator, Tier 2 machine").getDouble();
|
||||
stirlingGeneratorBurnTimeMultiplierT2, "[Deprecated]Burn time multiplier for the Stirling Generator, Tier 2 machine").getDouble();
|
||||
stirlingGeneratorBurnTimeMultiplierT3 = (float) config.get(sectionPower.name, "stirlingGeneratorBurnTimeMultiplierT3",
|
||||
stirlingGeneratorBurnTimeMultiplierT3, "Burn time multiplier for the Stirling Generator, Tier 3 machine").getDouble();
|
||||
stirlingGeneratorBurnTimeMultiplierT3, "[Deprecated]Burn time multiplier for the Stirling Generator, Tier 3 machine").getDouble();
|
||||
|
||||
stirlingGeneratorBurnTimeMultipliers = config.get(sectionPower.name, "stirlingGeneratorBurnTimeMultipliers",
|
||||
stirlingGeneratorBurnTimeMultipliers, "Burn time multipliers for the Stirling Generator").getDoubleList();
|
||||
|
||||
|
||||
addFuelTooltipsToAllFluidContainers = config.get(sectionPersonal.name, "addFuelTooltipsToAllFluidContainers", addFuelTooltipsToAllFluidContainers,
|
||||
"If true, the RF/t and burn time of the fuel will be displayed in all tooltips for fluid containers with fuel.").getBoolean(
|
||||
|
||||
@@ -11,6 +11,7 @@ import crazypants.enderio.material.FrankenSkull;
|
||||
import crazypants.enderio.material.MachinePart;
|
||||
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.enderio.material.Material.VIBRANT_CYSTAL;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
@@ -19,6 +20,7 @@ public class ItemRecipes {
|
||||
public static void addRecipes() {
|
||||
ItemStack basicGear = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
ItemStack diode = new ItemStack(EnderIO.itemFrankenSkull,1,FrankenSkull.GUARDIAN_DIODE.ordinal());
|
||||
ItemStack sentient = new ItemStack(EnderIO.itemFrankenSkull,1,FrankenSkull.SENTIENT_ENDER.ordinal());
|
||||
String electricalSteel = ELECTRICAL_STEEL.getOreIngot();
|
||||
String conductiveIron = CONDUCTIVE_IRON.getOreIngot();
|
||||
String vibCry = VIBRANT_CYSTAL.oreDict;
|
||||
@@ -26,7 +28,7 @@ public class ItemRecipes {
|
||||
String darkSteel = DARK_STEEL.getOreIngot();
|
||||
String soularium = SOULARIUM.getOreIngot();
|
||||
String endSteel = END_STEEL.getOreIngot();
|
||||
|
||||
String stellarAlloy = STELLAR_ALLOY.getOreIngot();
|
||||
|
||||
// Wrench
|
||||
ItemStack wrench = new ItemStack(EnderIO.itemYetaWench, 1, 0);
|
||||
@@ -49,6 +51,12 @@ public class ItemRecipes {
|
||||
addShaped(DarkSteelItems.itemEndSteelLeggings.createItemStack(), "sss", "sds", "s s", 's', endSteel, 'd', diode);
|
||||
addShaped(DarkSteelItems.itemEndSteelBoots.createItemStack(), "s s", "sds", 's', endSteel, 'd', diode);
|
||||
|
||||
//Stellar
|
||||
addShaped(DarkSteelItems.itemStellarHelmet.createItemStack(), "sss", "sds", 's', stellarAlloy, 'd', sentient);
|
||||
addShaped(DarkSteelItems.itemStellarChestplate.createItemStack(), "sds", "sss", "sss", 's', stellarAlloy, 'd', sentient);
|
||||
addShaped(DarkSteelItems.itemStellarLeggings.createItemStack(), "sss", "sds", "s s", 's', stellarAlloy, 'd', sentient);
|
||||
addShaped(DarkSteelItems.itemStellarBoots.createItemStack(), "s s", "sds", 's', stellarAlloy, 'd', sentient);
|
||||
|
||||
ItemStack wing = new ItemStack(DarkSteelItems.itemGliderWing, 1, 0);
|
||||
addShaped(wing, " s", " sl", "sll", 's', darkSteel, 'l', Items.leather);
|
||||
addShaped(new ItemStack(DarkSteelItems.itemGliderWing, 1, 1), " s ", "wsw", " ", 's', darkSteel, 'w', wing);
|
||||
@@ -85,5 +93,12 @@ public class ItemRecipes {
|
||||
addShaped(DarkSteelItems.itemEndSteelAxe.createItemStack(), "ss ", "sw ", " w ", 's', endSteel, 'w', "stickDarkSteel");
|
||||
addShaped(DarkSteelItems.itemEndSteelAxe.createItemStack(), "ss ", "sw ", " w ", 's', endSteel, 'w', "itemDarkSteelRod");
|
||||
|
||||
// Stellar Tools
|
||||
addShaped(DarkSteelItems.itemStellarSword.createItemStack(), " s ", " s ", " e ", 's', stellarAlloy,'e', sentient, 'w', "itemDarkSteelRod");
|
||||
addShaped(DarkSteelItems.itemStellarPickaxe.createItemStack(), "sss", " e ", " w ", 's', stellarAlloy,'e', sentient, 'w', "stickDarkSteel");
|
||||
addShaped(DarkSteelItems.itemStellarPickaxe.createItemStack(), "sss", " e ", " w ", 's', stellarAlloy,'e', sentient, 'w', "itemDarkSteelRod");
|
||||
addShaped(DarkSteelItems.itemStellarAxe.createItemStack(), "ss ", "se ", " w ", 's', stellarAlloy,'e', sentient, 'w', "stickDarkSteel");
|
||||
addShaped(DarkSteelItems.itemStellarAxe.createItemStack(), "ss ", "se ", " w ", 's', stellarAlloy,'e', sentient, 'w', "itemDarkSteelRod");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,14 @@ public class DarkSteelItems {
|
||||
public static ItemEndSteelPickaxe itemEndSteelPickaxe;
|
||||
public static ItemEndSteelAxe itemEndSteelAxe;
|
||||
|
||||
public static ItemStellarArmor itemStellarHelmet;
|
||||
public static ItemStellarArmor itemStellarChestplate;
|
||||
public static ItemStellarArmor itemStellarLeggings;
|
||||
public static ItemStellarArmor itemStellarBoots;
|
||||
public static ItemStellarSword itemStellarSword;
|
||||
public static ItemStellarPickaxe itemStellarPickaxe;
|
||||
public static ItemStellarAxe itemStellarAxe;
|
||||
|
||||
public static ItemMagnet itemMagnet;
|
||||
|
||||
private DarkSteelItems() {
|
||||
@@ -58,16 +66,25 @@ public class DarkSteelItems {
|
||||
itemEndSteelPickaxe = ItemEndSteelPickaxe.create();
|
||||
itemEndSteelAxe = ItemEndSteelAxe.create();
|
||||
|
||||
itemStellarHelmet = ItemStellarArmor.create(0);
|
||||
itemStellarChestplate = ItemStellarArmor.create(1);
|
||||
itemStellarLeggings = ItemStellarArmor.create(2);
|
||||
itemStellarBoots = ItemStellarArmor.create(3);
|
||||
|
||||
itemStellarSword = ItemStellarSword.create();
|
||||
itemStellarPickaxe = ItemStellarPickaxe.create();
|
||||
itemStellarAxe = ItemStellarAxe.create();
|
||||
|
||||
itemMagnet = ItemMagnet.create();
|
||||
|
||||
}
|
||||
|
||||
public static boolean isArmorPart(Item item, int type){
|
||||
switch(type){
|
||||
case 0:return item == itemDarkSteelHelmet||item == itemEndSteelHelmet;
|
||||
case 1:return item == itemDarkSteelChestplate||item == itemEndSteelChestplate;
|
||||
case 2:return item == itemDarkSteelLeggings||item == itemEndSteelLeggings;
|
||||
case 3:return item == itemDarkSteelBoots||item == itemEndSteelBoots;
|
||||
case 0:return item == itemDarkSteelHelmet||item == itemEndSteelHelmet||item == itemStellarHelmet;
|
||||
case 1:return item == itemDarkSteelChestplate||item == itemEndSteelChestplate||item == itemStellarChestplate;
|
||||
case 2:return item == itemDarkSteelLeggings||item == itemEndSteelLeggings||item == itemStellarLeggings;
|
||||
case 3:return item == itemDarkSteelBoots||item == itemEndSteelBoots||item == itemStellarBoots;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@@ -107,5 +124,13 @@ public class DarkSteelItems {
|
||||
MinecraftForgeClient.registerItemRenderer(itemEndSteelSword, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemEndSteelPickaxe, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemEndSteelAxe, dsr);
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarBoots, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarLeggings, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarChestplate, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarHelmet, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarSword, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarPickaxe, dsr);
|
||||
MinecraftForgeClient.registerItemRenderer(itemStellarAxe, dsr);
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IEndSteelItem;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IStellarItem;
|
||||
import crazypants.enderio.item.darksteel.upgrade.ApiaristArmorUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.GliderUpgrade;
|
||||
@@ -35,6 +36,7 @@ import crazypants.enderio.item.darksteel.upgrade.SpoonUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.SwimUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.TravelUpgrade;
|
||||
import crazypants.enderio.material.Alloy;
|
||||
import crazypants.enderio.material.endergy.AlloyEndergy;
|
||||
import crazypants.enderio.thaumcraft.ThaumcraftCompat;
|
||||
|
||||
public class DarkSteelRecipeManager {
|
||||
@@ -82,11 +84,19 @@ public class DarkSteelRecipeManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if(evt.left.getItem() instanceof IEndSteelItem && OreDictionaryHelper.hasName(evt.right, Alloy.END_STEEL.getOreIngot())) {
|
||||
if(evt.left.getItem() instanceof IStellarItem && OreDictionaryHelper.hasName(evt.right, AlloyEndergy.STELLAR_ALLOY.getOreIngot())) {
|
||||
handleRepair(evt);
|
||||
}else if(evt.left.getItem() instanceof IDarkSteelItem && OreDictionaryHelper.hasName(evt.right, Alloy.DARK_STEEL.getOreIngot())) {
|
||||
}
|
||||
|
||||
else if(evt.left.getItem() instanceof IEndSteelItem && OreDictionaryHelper.hasName(evt.right, Alloy.END_STEEL.getOreIngot())) {
|
||||
handleRepair(evt);
|
||||
}
|
||||
|
||||
else if(evt.left.getItem() instanceof IDarkSteelItem && OreDictionaryHelper.hasName(evt.right, Alloy.DARK_STEEL.getOreIngot())) {
|
||||
handleRepair(evt);
|
||||
} else {
|
||||
}
|
||||
|
||||
else {
|
||||
handleUpgrade(evt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,8 @@ public interface IDarkSteelItem {
|
||||
|
||||
}
|
||||
|
||||
public interface IStellarItem extends IEndSteelItem {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IEndSteelItem;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IStellarItem;
|
||||
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.IDarkSteelUpgrade;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class ItemStellarArmor extends ItemDarkSteelArmor implements IStellarItem {
|
||||
|
||||
public static final ArmorMaterial MATERIAL = EnumHelper.addArmorMaterial("stellarAlloy", 75, new int[] {8, 14, 18, 7}, 25);
|
||||
|
||||
public ItemStellarArmor(int armorType) {
|
||||
super(MATERIAL, "stellar", armorType);
|
||||
|
||||
}
|
||||
|
||||
public static ItemStellarArmor create(int armorType) {
|
||||
ItemStellarArmor res = new ItemStellarArmor(armorType);
|
||||
res.init();
|
||||
return res;
|
||||
}
|
||||
|
||||
public static ItemStellarArmor forArmorType(int armorType) {
|
||||
switch (armorType) {
|
||||
case 0: return DarkSteelItems.itemStellarHelmet;
|
||||
case 1: return DarkSteelItems.itemStellarChestplate;
|
||||
case 2: return DarkSteelItems.itemStellarLeggings;
|
||||
case 3: return DarkSteelItems.itemStellarBoots;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int getPoweredProtectionIncrease(int armorType) {
|
||||
switch (armorType) {
|
||||
case 0: return 2;
|
||||
case 1: return 1;
|
||||
case 2: return 4;
|
||||
case 3: return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack is = new ItemStack(this);
|
||||
par3List.add(is);
|
||||
|
||||
is = new ItemStack(this);
|
||||
EnergyUpgrade.EMPOWERED_FIVE.writeToItem(is);
|
||||
EnergyUpgrade.setPowerFull(is);
|
||||
|
||||
Iterator<IDarkSteelUpgrade> iter = DarkSteelRecipeManager.instance.recipeIterator();
|
||||
while (iter.hasNext()) {
|
||||
IDarkSteelUpgrade upgrade = iter.next();
|
||||
if (!(upgrade instanceof EnergyUpgrade) && upgrade.canAddToItem(is)) {
|
||||
upgrade.writeToItem(is);
|
||||
}
|
||||
}
|
||||
|
||||
par3List.add(is);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.TravelUpgrade;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IStellarItem;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class ItemStellarAxe extends ItemDarkSteelAxe implements IStellarItem {
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
}
|
||||
ItemStack equipped = player.getCurrentEquippedItem();
|
||||
if(equipped == null) {
|
||||
return false;
|
||||
}
|
||||
return equipped.getItem() == DarkSteelItems.itemStellarAxe;
|
||||
}
|
||||
|
||||
public static ItemStellarAxe create() {
|
||||
ItemStellarAxe res = new ItemStellarAxe();
|
||||
res.init();
|
||||
MinecraftForge.EVENT_BUS.register(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
public ItemStellarAxe() {
|
||||
super("stellar", ItemStellarSword.MATERIAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack is = new ItemStack(this);
|
||||
par3List.add(is);
|
||||
|
||||
is = new ItemStack(this);
|
||||
EnergyUpgrade.EMPOWERED_FIVE.writeToItem(is);
|
||||
EnergyUpgrade.setPowerFull(is);
|
||||
TravelUpgrade.INSTANCE.writeToItem(is);
|
||||
par3List.add(is);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.TravelUpgrade;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IStellarItem;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class ItemStellarPickaxe extends ItemDarkSteelPickaxe implements IStellarItem {
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
}
|
||||
ItemStack equipped = player.getCurrentEquippedItem();
|
||||
if(equipped == null) {
|
||||
return false;
|
||||
}
|
||||
return equipped.getItem() == DarkSteelItems.itemStellarPickaxe;
|
||||
}
|
||||
|
||||
public static ItemStellarPickaxe create() {
|
||||
ItemStellarPickaxe res = new ItemStellarPickaxe();
|
||||
res.init();
|
||||
MinecraftForge.EVENT_BUS.register(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
public ItemStellarPickaxe() {
|
||||
super("stellar", ItemStellarSword.MATERIAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack is = new ItemStack(this);
|
||||
par3List.add(is);
|
||||
|
||||
is = new ItemStack(this);
|
||||
EnergyUpgrade.EMPOWERED_FIVE.writeToItem(is);
|
||||
EnergyUpgrade.setPowerFull(is);
|
||||
TravelUpgrade.INSTANCE.writeToItem(is);
|
||||
par3List.add(is);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package crazypants.enderio.item.darksteel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
|
||||
import crazypants.enderio.item.darksteel.upgrade.TravelUpgrade;
|
||||
import crazypants.enderio.item.darksteel.IDarkSteelItem.IStellarItem;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class ItemStellarSword extends ItemDarkSteelSword implements IStellarItem {
|
||||
|
||||
static final ToolMaterial MATERIAL = EnumHelper.addToolMaterial("stellarAlloy", Config.darkSteelPickMinesTiCArdite ? 5 : 3, 5000, 16, 11, 25);
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
}
|
||||
ItemStack equipped = player.getCurrentEquippedItem();
|
||||
if(equipped == null) {
|
||||
return false;
|
||||
}
|
||||
return equipped.getItem() == DarkSteelItems.itemStellarSword;
|
||||
}
|
||||
|
||||
|
||||
public static ItemStellarSword create() {
|
||||
ItemStellarSword res = new ItemStellarSword();
|
||||
res.init();
|
||||
MinecraftForge.EVENT_BUS.register(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
public ItemStellarSword() {
|
||||
super("stellar",MATERIAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack is = new ItemStack(this);
|
||||
par3List.add(is);
|
||||
|
||||
is = new ItemStack(this);
|
||||
EnergyUpgrade.EMPOWERED_FIVE.writeToItem(is);
|
||||
EnergyUpgrade.setPowerFull(is);
|
||||
TravelUpgrade.INSTANCE.writeToItem(is);
|
||||
par3List.add(is);
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,11 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import com.enderio.core.common.vecmath.VecmathUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.material.ItemCapacitor;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
import crazypants.enderio.power.ICapacitorItem;
|
||||
import crazypants.enderio.power.IInternalPoweredTile;
|
||||
import crazypants.enderio.power.PowerHandlerUtil;
|
||||
|
||||
@@ -25,7 +27,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
|
||||
protected AbstractPoweredMachineEntity(SlotDefinition slotDefinition) {
|
||||
super(slotDefinition);
|
||||
capacitorType = Capacitors.BASIC_CAPACITOR;
|
||||
setCapacitor(Capacitors.BASIC_CAPACITOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,7 +97,20 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
}
|
||||
|
||||
public ICapacitor getCapacitor() {
|
||||
return capacitor != null ? capacitor : capacitorType.capacitor;
|
||||
|
||||
if(capacitor != null) {
|
||||
return capacitor;
|
||||
}
|
||||
|
||||
else if(capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if(contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
return EnderIO.itemBasicCapacitor.getCapacitor(contents);
|
||||
}
|
||||
}
|
||||
|
||||
return capacitorType.capacitor;
|
||||
|
||||
}
|
||||
|
||||
public int getEnergyStoredScaled(int scale) {
|
||||
@@ -111,7 +126,18 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
|
||||
public void setCapacitor(Capacitors capacitorType) {
|
||||
this.capacitorType = capacitorType;
|
||||
this.capacitor = null;
|
||||
|
||||
if(capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if(contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
setCapacitor(EnderIO.itemBasicCapacitor.getCapacitor(contents));
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
this.capacitor = capacitorType.capacitor;
|
||||
}
|
||||
|
||||
onCapacitorTypeChange();
|
||||
//Force a check that the new value is in bounds
|
||||
setEnergyStored(getEnergyStored());
|
||||
|
||||
@@ -38,12 +38,12 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
private boolean bufferStacks = true;
|
||||
|
||||
private long ticksSinceLastCraft = 0;
|
||||
|
||||
|
||||
private FakePlayer playerInst;
|
||||
|
||||
public TileCrafter() {
|
||||
super(new SlotDefinition(9, 1));
|
||||
containerItems = new ArrayList<ItemStack>();
|
||||
containerItems = new ArrayList<ItemStack>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -51,7 +51,7 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
ICapacitor refCap = getCapacitor();
|
||||
int maxUse = getPowerUsePerTick(getCapacitorType());
|
||||
int io = Math.max(maxUse, refCap.getMaxEnergyExtracted());
|
||||
setCapacitor(new BasicCapacitor(io * 4, refCap.getMaxEnergyStored(), io));
|
||||
setCapacitor(new BasicCapacitor(0, io * 4, refCap.getMaxEnergyStored(), io));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,9 +115,9 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
public int getPowerUsePerTick() {
|
||||
return getPowerUsePerTick(getCapacitorType());
|
||||
}
|
||||
|
||||
|
||||
public int getPowerUsePerTick(Capacitors type) {
|
||||
int ticks = getTicksPerCraft(type);
|
||||
int ticks = getTicksPerCraft(type);
|
||||
return (int)Math.ceil(Config.crafterRfPerCraft / (double)ticks);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
return 10;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static boolean compareDamageable(ItemStack stack, ItemStack req) {
|
||||
@@ -156,7 +156,7 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
}, 3, 3);
|
||||
|
||||
int[] usedItems = new int[9];
|
||||
|
||||
|
||||
for (int j = 0; j < 9; j++) {
|
||||
ItemStack req = craftingGrid.getStackInSlot(j);
|
||||
if (req != null) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import crazypants.enderio.machine.farm.farmers.IHarvestResult;
|
||||
import crazypants.enderio.machine.farm.farmers.RubberTreeFarmerIC2;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.power.BasicCapacitor;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.tool.ArrayMappingTool;
|
||||
|
||||
public class TileFarmStation extends AbstractPoweredTaskEntity {
|
||||
@@ -195,7 +196,7 @@ public class TileFarmStation extends AbstractPoweredTaskEntity {
|
||||
if(inventory[upg] == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return Config.farmBonusSize * inventory[upg].getItemDamage();
|
||||
return Config.farmBonusSize * EnderIO.itemBasicCapacitor.getCapacitor(inventory[upg]).getTier();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,13 +710,13 @@ public class TileFarmStation extends AbstractPoweredTaskEntity {
|
||||
int ppt = calcPowerUsePerTick();
|
||||
switch (getCapacitorType()) {
|
||||
case BASIC_CAPACITOR:
|
||||
setCapacitor(new BasicCapacitor(ppt * 40, 250000, ppt));
|
||||
setCapacitor(new BasicCapacitor(0, ppt * 40, 250000, ppt));
|
||||
break;
|
||||
case ACTIVATED_CAPACITOR:
|
||||
setCapacitor(new BasicCapacitor(ppt * 40, 500000, ppt));
|
||||
setCapacitor(new BasicCapacitor(0, ppt * 40, 500000, ppt));
|
||||
break;
|
||||
case ENDER_CAPACITOR:
|
||||
setCapacitor(new BasicCapacitor(ppt * 40, 1000000, ppt));
|
||||
setCapacitor(new BasicCapacitor(0, ppt * 40, 1000000, ppt));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -45,12 +45,12 @@ public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirli
|
||||
addProgressTooltip(80, 52, 14, 14);
|
||||
}
|
||||
|
||||
private static float getFactor(Capacitors upgrade) {
|
||||
return TileEntityStirlingGenerator.getEnergyMultiplier(upgrade) *
|
||||
TileEntityStirlingGenerator.getBurnTimeMultiplier(upgrade);
|
||||
private float getFactor(Capacitors upgrade) {
|
||||
return getTileEntity().getEnergyMultiplier() *
|
||||
getTileEntity().getBurnTimeMultiplier();
|
||||
}
|
||||
|
||||
private static String formatUpgrade(MessageFormat fmt, Capacitors upgrade) {
|
||||
private String formatUpgrade(MessageFormat fmt, Capacitors upgrade) {
|
||||
float efficiency = getFactor(upgrade) / getFactor(Capacitors.BASIC_CAPACITOR);
|
||||
Object[] args = new Object[] {
|
||||
EnderIO.lang.localizeExact(upgrade.unlocalisedName.concat(".name")),
|
||||
@@ -113,7 +113,7 @@ public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirli
|
||||
fr.drawStringWithShadow(txt, guiLeft + xSize / 2 - sw / 2, y, ColorUtil.getRGB(Color.WHITE));
|
||||
|
||||
txt = String.format("%s %d%%", EnderIO.lang.localize("stirlingGenerator.burnRate"),
|
||||
Math.round(getTileEntity().getBurnTimeMultiplier() / Config.stirlingGeneratorBurnTimeMultiplierT1 * 100));
|
||||
Math.round(getTileEntity().getBurnTimeMultiplier() / Config.stirlingGeneratorBurnTimeMultipliers[0] * 100));
|
||||
sw = fr.getStringWidth(txt);
|
||||
y += fr.FONT_HEIGHT + 3;
|
||||
fr.drawStringWithShadow(txt, guiLeft + xSize / 2 - sw / 2, y, ColorUtil.getRGB(Color.WHITE));
|
||||
|
||||
@@ -6,11 +6,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.enderio.core.api.common.util.IProgressTile;
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.machine.SlotDefinition;
|
||||
@@ -29,9 +31,9 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
public int totalBurnTime;
|
||||
|
||||
private PowerDistributor powerDis;
|
||||
|
||||
|
||||
public TileEntityStirlingGenerator() {
|
||||
super(new SlotDefinition(1, 0));
|
||||
super(new SlotDefinition(1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,12 +88,12 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
public TileEntity getTileEntity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSoundName() {
|
||||
return SOUND_NAME;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound nbtRoot) {
|
||||
super.readCustomNBT(nbtRoot);
|
||||
@@ -127,13 +129,13 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
protected boolean processTasks(boolean redstoneCheckPassed) {
|
||||
boolean needsUpdate = false;
|
||||
boolean sendBurnTimePacket = false;
|
||||
|
||||
|
||||
if(burnTime > 0) {
|
||||
if(getEnergyStored() < getMaxEnergyStored()) {
|
||||
setEnergyStored(getEnergyStored() + getPowerUsePerTick());
|
||||
setEnergyStored(getEnergyStored() + getPowerUsePerTick());
|
||||
}
|
||||
burnTime--;
|
||||
sendBurnTimePacket = shouldDoWorkThisTick(20,-1) || burnTime == 0;
|
||||
sendBurnTimePacket = shouldDoWorkThisTick(20,-1) || burnTime == 0;
|
||||
}
|
||||
|
||||
transmitEnergy();
|
||||
@@ -183,32 +185,17 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
return doPush(dir, te, 0, 0);
|
||||
}
|
||||
|
||||
public static float getEnergyMultiplier(Capacitors capacitorType) {
|
||||
if(capacitorType == Capacitors.ACTIVATED_CAPACITOR) {
|
||||
return Config.stirlingGeneratorEnergyMultiplierT2;
|
||||
} else if(capacitorType == Capacitors.ENDER_CAPACITOR) {
|
||||
return Config.stirlingGeneratorEnergyMultiplierT3;
|
||||
}
|
||||
return Config.stirlingGeneratorEnergyMultiplierT1;
|
||||
}
|
||||
|
||||
private float getEnergyMultiplier() {
|
||||
return getEnergyMultiplier(getCapacitorType());
|
||||
}
|
||||
|
||||
public static float getBurnTimeMultiplier(Capacitors capacitorType) {
|
||||
if(capacitorType == Capacitors.ACTIVATED_CAPACITOR) {
|
||||
return Config.stirlingGeneratorBurnTimeMultiplierT2;
|
||||
} else if(capacitorType == Capacitors.ENDER_CAPACITOR) {
|
||||
return Config.stirlingGeneratorBurnTimeMultiplierT3;
|
||||
}
|
||||
return Config.stirlingGeneratorBurnTimeMultiplierT1;
|
||||
public float getEnergyMultiplier() {
|
||||
int tier = MathHelper.clamp_int(getCapacitor().getTier(), 1, Config.stirlingGeneratorEnergyMultipliers.length);
|
||||
return (float)Config.stirlingGeneratorEnergyMultipliers[tier-1];
|
||||
}
|
||||
|
||||
public float getBurnTimeMultiplier() {
|
||||
return getBurnTimeMultiplier(getCapacitorType());
|
||||
int tier = MathHelper.clamp_int(getCapacitor().getTier(), 1, Config.stirlingGeneratorBurnTimeMultipliers.length);
|
||||
return (float)Config.stirlingGeneratorBurnTimeMultipliers[tier-1];
|
||||
}
|
||||
|
||||
|
||||
//private PowerDistributor powerDis;
|
||||
private boolean transmitEnergy() {
|
||||
if(powerDis == null) {
|
||||
@@ -219,7 +206,7 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
return false;
|
||||
}
|
||||
int transmitted = powerDis.transmitEnergy(worldObj, canTransmit);
|
||||
setEnergyStored(getEnergyStored() - transmitted);
|
||||
setEnergyStored(getEnergyStored() - transmitted);
|
||||
return transmitted > 0;
|
||||
}
|
||||
|
||||
@@ -227,6 +214,6 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package crazypants.enderio.machine.generator.zombie;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
@@ -328,9 +329,9 @@ public class TileZombieGenerator extends AbstractGeneratorEntity implements IFlu
|
||||
}
|
||||
|
||||
public int getOutputPerTick(){
|
||||
if(inventory[slotDefinition.getMaxUpgradeSlot()] != null)
|
||||
return baseOutputPerTick*(4+inventory[slotDefinition.getMaxUpgradeSlot()].getItemDamage())/4;
|
||||
else return baseOutputPerTick;
|
||||
int tier = MathHelper.clamp_int(getCapacitor().getTier(), 1, Config.zombieGeneratorsEnergyMultipliers.length);
|
||||
return (int)(baseOutputPerTick*Config.zombieGeneratorsEnergyMultipliers[tier-1]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,17 +22,20 @@ import crazypants.enderio.power.Capacitors;
|
||||
public class TileSliceAndSplice extends AbstractPoweredTaskEntity {
|
||||
|
||||
public static final int POWER_PER_TICK_ONE = Config.sliceAndSpliceLevelOnePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(POWER_PER_TICK_ONE * 2,
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(0,
|
||||
POWER_PER_TICK_ONE * 2,
|
||||
Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored(),
|
||||
POWER_PER_TICK_ONE);
|
||||
|
||||
public static final int POWER_PER_TICK_TWO = Config.sliceAndSpliceLevelTwoPowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(POWER_PER_TICK_TWO * 2,
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(0,
|
||||
POWER_PER_TICK_TWO * 2,
|
||||
Capacitors.ACTIVATED_CAPACITOR.capacitor.getMaxEnergyStored(),
|
||||
POWER_PER_TICK_TWO);
|
||||
|
||||
public static final int POWER_PER_TICK_THREE = Config.sliceAndSpliceLevelThreePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(POWER_PER_TICK_THREE * 2,
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(0,
|
||||
POWER_PER_TICK_THREE * 2,
|
||||
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(),
|
||||
POWER_PER_TICK_THREE);
|
||||
|
||||
@@ -66,6 +69,8 @@ public class TileSliceAndSplice extends AbstractPoweredTaskEntity {
|
||||
case ENDER_CAPACITOR:
|
||||
setCapacitor(CAP_THREE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import crazypants.enderio.xp.XpUtil;
|
||||
public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveExperience, IFluidHandler, ITankAccess {
|
||||
|
||||
public static final int POWER_PER_TICK_ONE = Config.soulBinderLevelOnePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(POWER_PER_TICK_ONE * 2,
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(POWER_PER_TICK_ONE * 2,
|
||||
Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_ONE);
|
||||
|
||||
public static final int POWER_PER_TICK_TWO = Config.soulBinderLevelTwoPowerPerTickRF;
|
||||
@@ -42,7 +42,7 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
public static final int POWER_PER_TICK_THREE = Config.soulBinderLevelThreePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(POWER_PER_TICK_THREE * 2,
|
||||
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_THREE);
|
||||
|
||||
|
||||
private final ExperienceContainer xpCont = new ExperienceContainer(XpUtil.getExperienceForLevel(Config.soulBinderMaxXpLevel));
|
||||
|
||||
public TileSoulBinder() {
|
||||
@@ -50,20 +50,20 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExperienceContainer getContainer() {
|
||||
public ExperienceContainer getContainer() {
|
||||
return xpCont;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
public String getMachineName() {
|
||||
return ModObject.blockSoulBinder.unlocalisedName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean processTasks(boolean redstoneChecksPassed) {
|
||||
if(xpCont.isDirty()) {
|
||||
@@ -115,7 +115,7 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
return ((ISoulBinderRecipe)nextRecipe).getExperienceLevelsRequired();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean startNextTask(IMachineRecipe nextRecipe, float chance) {
|
||||
@@ -136,17 +136,17 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
return false;
|
||||
}
|
||||
MachineRecipeInput newInput = new MachineRecipeInput(slot, item);
|
||||
int otherSlot = slot == 0 ? 1 : 0;
|
||||
int otherSlot = slot == 0 ? 1 : 0;
|
||||
if(inventory[otherSlot] == null) {
|
||||
List<IMachineRecipe> recipes = MachineRecipeRegistry.instance.getRecipesForInput(getMachineName(), newInput);
|
||||
if(recipes.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for(IMachineRecipe rec : recipes) {
|
||||
if(rec != null && rec.isValidInput(newInput)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
MachineRecipeInput[] inputs = new MachineRecipeInput[] {
|
||||
newInput,
|
||||
@@ -169,6 +169,22 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
case ENDER_CAPACITOR:
|
||||
setCapacitor(CAP_THREE);
|
||||
break;
|
||||
case CRYSTALLINE_CAPACITOR:
|
||||
break;
|
||||
case ENDERGETIC_CAPACITOR:
|
||||
break;
|
||||
case ENDERGISED_CAPACITOR:
|
||||
break;
|
||||
case MELODIC_CAPACITOR:
|
||||
break;
|
||||
case SILVER_CAPACITOR:
|
||||
break;
|
||||
case STELLAR_CAPACITOR:
|
||||
break;
|
||||
case TOTEMIC_CAPACITOR:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +197,7 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean doPush(ForgeDirection dir) {
|
||||
boolean res = super.doPush(dir);
|
||||
@@ -195,7 +211,7 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
/**
|
||||
* Determines how much stored XP can/should be removed because it is not
|
||||
* needed for the next recipe.
|
||||
*
|
||||
*
|
||||
* @return A number between 0 and the amount of stored XP
|
||||
*/
|
||||
private int getExcessXP() {
|
||||
@@ -209,10 +225,10 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
return xpCont.canFill(from, fluid);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
int max = XpUtil.experienceToLiquid(getXPRequired());
|
||||
@@ -240,17 +256,17 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
return xpCont.drain(from, Math.min(XpUtil.experienceToLiquid(getExcessXP()), maxDrain), doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
return xpCont.canDrain(from, fluid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
return xpCont.getTankInfo(from);
|
||||
}
|
||||
|
||||
@@ -261,11 +277,11 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCommon(NBTTagCompound nbtRoot) {
|
||||
public void writeCommon(NBTTagCompound nbtRoot) {
|
||||
super.writeCommon(nbtRoot);
|
||||
xpCont.writeToNBT(nbtRoot);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public FluidTank getInputTank(FluidStack forFluidType) {
|
||||
return xpCont;
|
||||
@@ -280,5 +296,5 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
public void setTanksDirty() {
|
||||
xpCont.setDirty(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,14 +25,14 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
|
||||
public static final int MAX_SPAWN_DELAY_BASE = Config.poweredSpawnerMaxDelayTicks;
|
||||
|
||||
public static final int POWER_PER_TICK_ONE = Config.poweredSpawnerLevelOnePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor((int) (POWER_PER_TICK_ONE * 1.25), Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored());
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(0, (int) (POWER_PER_TICK_ONE * 1.25), Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored());
|
||||
|
||||
public static final int POWER_PER_TICK_TWO = Config.poweredSpawnerLevelTwoPowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor((int) (POWER_PER_TICK_TWO * 1.25),
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(0,(int) (POWER_PER_TICK_TWO * 1.25),
|
||||
Capacitors.ACTIVATED_CAPACITOR.capacitor.getMaxEnergyStored());
|
||||
|
||||
public static final int POWER_PER_TICK_THREE = Config.poweredSpawnerLevelThreePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor((int) (POWER_PER_TICK_THREE * 1.25),
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(0,(int) (POWER_PER_TICK_THREE * 1.25),
|
||||
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored());
|
||||
|
||||
public static final int MIN_PLAYER_DISTANCE = Config.poweredSpawnerMaxPlayerDistance;
|
||||
@@ -226,7 +226,7 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
|
||||
&& worldObj.getCollidingBoundingBoxes(entityliving, entityliving.boundingBox).isEmpty()
|
||||
&& (!worldObj.isAnyLiquid(entityliving.boundingBox) || entityliving.isCreatureType(EnumCreatureType.waterCreature, false));
|
||||
if(spaceClear && USE_VANILLA_SPAWN_CHECKS) {
|
||||
//Full checks for lighting, dimension etc
|
||||
//Full checks for lighting, dimension etc
|
||||
spaceClear = entityliving.getCanSpawnHere();
|
||||
}
|
||||
return spaceClear;
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -76,15 +78,26 @@ public class ItemCapacitor extends Item implements ICapacitorItem {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int j = 0; j < Capacitors.values().length; ++j) {
|
||||
par3List.add(new ItemStack(par1, 1, j));
|
||||
if(Capacitors.values()[j] == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack stack = new ItemStack(par1, 1, j);
|
||||
stack.addEnchantment(Enchantment.efficiency, 5);
|
||||
par3List.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICapacitor getCapacitor(ItemStack stack) {
|
||||
int damage = MathHelper.clamp_int(stack.getItemDamage(), 0, Capacitors.values().length - 1);
|
||||
|
||||
if(Capacitors.values()[damage] == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
damage = MathHelper.clamp_int(EnchantmentHelper.getEnchantmentLevel(Enchantment.efficiency.effectId, stack)+1, 1, Capacitors.TOTEMIC_CAPACITOR.ordinal());
|
||||
}
|
||||
|
||||
return Capacitors.values()[damage].capacitor;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
|
||||
@@ -14,11 +14,14 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.item.ItemEnderFood.EnderFood;
|
||||
import crazypants.enderio.material.endergy.AlloyEndergy;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
|
||||
import static crazypants.enderio.power.Capacitors.*;
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.*;
|
||||
import static crazypants.enderio.EnderIO.itemBasicCapacitor;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.util.RecipeUtil.*;
|
||||
|
||||
public class MaterialRecipes {
|
||||
@@ -42,6 +45,10 @@ public class MaterialRecipes {
|
||||
}
|
||||
}
|
||||
|
||||
for(Capacitors capacitor: Capacitors.values()){
|
||||
OreDictionary.registerOre(capacitor.getOreTag(), new ItemStack(EnderIO.itemBasicCapacitor,1,capacitor.ordinal()));
|
||||
}
|
||||
|
||||
for (Alloy alloy : Alloy.values()) {
|
||||
boolean isPrimaryName = true;
|
||||
for (String oreDictName : alloy.getOreIngots()) {
|
||||
@@ -66,8 +73,33 @@ public class MaterialRecipes {
|
||||
}
|
||||
}
|
||||
|
||||
for (AlloyEndergy alloy : AlloyEndergy.values()) {
|
||||
boolean isPrimaryName = true;
|
||||
for (String oreDictName : alloy.getOreIngots()) {
|
||||
OreDictionary.registerOre(oreDictName, alloy.getStackIngot());
|
||||
if (isPrimaryName) {
|
||||
isPrimaryName = false;
|
||||
} else {
|
||||
// Allow free conversion of additional/legacy oreDict name items into
|
||||
// our item because we only register recipes for the primary oreDict
|
||||
// name. Use a 2-to-2 recipe because the 1-to-n is already in use.
|
||||
addShapeless(alloy.getStackIngot(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
isPrimaryName = true;
|
||||
for (String oreDictName : alloy.getOreBlocks()) {
|
||||
OreDictionary.registerOre(oreDictName, alloy.getStackBlock());
|
||||
if (isPrimaryName) {
|
||||
isPrimaryName = false;
|
||||
} else {
|
||||
addShapeless(alloy.getStackBlock(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("nuggetPulsatingIron", new ItemStack(EnderIO.itemMaterial, 1, Material.PHASED_IRON_NUGGET.ordinal()));
|
||||
OreDictionary.registerOre("nuggetVibrantAlloy", new ItemStack(EnderIO.itemMaterial, 1, Material.VIBRANT_NUGGET.ordinal()));
|
||||
OreDictionary.registerOre("nuggetEndSteel", new ItemStack(EnderIO.itemMaterial, 1, Material.END_STEEL_NUGGET.ordinal()));
|
||||
|
||||
OreDictionary.registerOre("glass", Blocks.glass);
|
||||
OreDictionary.registerOre("stickWood", Items.stick);
|
||||
@@ -109,7 +141,51 @@ public class MaterialRecipes {
|
||||
String soularium = SOULARIUM.getOreIngot();
|
||||
String endSteel = END_STEEL.getOreIngot();
|
||||
|
||||
ItemStack capacitor = new ItemStack(itemBasicCapacitor, 1, 0);
|
||||
String energeticSilver = ENERGETIC_SILVER.getOreIngot();
|
||||
String vividAlloy = VIVID_ALLOY.getOreIngot();
|
||||
String crystallineAlloy = CRYSTALLINE_ALLOY.getOreIngot();
|
||||
String melodicAlloy = MELODIC_ALLOY.getOreIngot();
|
||||
String stellarAlloy = STELLAR_ALLOY.getOreIngot();
|
||||
|
||||
String capacitor = Capacitors.BASIC_CAPACITOR.getOreTag();
|
||||
String capacitorAdv = Capacitors.ACTIVATED_CAPACITOR.getOreTag();
|
||||
String capacitorEnder = Capacitors.ENDER_CAPACITOR.getOreTag();
|
||||
String capacitorCrystal = Capacitors.CRYSTALLINE_CAPACITOR.getOreTag();
|
||||
String capacitorMelodic = Capacitors.MELODIC_CAPACITOR.getOreTag();
|
||||
|
||||
String ingotCopper = OreDictionary.doesOreNameExist("ingotCopper") && Config.useModMetals ? "ingotCopper": "ingotIron";
|
||||
|
||||
//Capacitors
|
||||
if (Config.useHardRecipes) {
|
||||
addShaped(BASIC_CAPACITOR.getItemStack(), " gr", "gig", "rg ", 'r', "dustRedstone", 'g', "ingotGold", 'i', ingotCopper);
|
||||
addShaped(ACTIVATED_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', energeticAlloy, 'c', BASIC_CAPACITOR.getItemStack(), 'C', "dustCoal");
|
||||
addShaped(ENDER_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', phasedGold, 'c', ACTIVATED_CAPACITOR.getItemStack(), 'C', "glowstone");
|
||||
|
||||
String prismarine = OreDictionary.doesOreNameExist("shardPrismarine") ? "shardPrismarine": "itemPulsatingCrystal";
|
||||
addShaped(CRYSTALLINE_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', crystallineAlloy, 'c', capacitorEnder, 'C', prismarine);
|
||||
addShaped(MELODIC_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', melodicAlloy, 'c', CRYSTALLINE_CAPACITOR.getItemStack(), 'C', endSteel);
|
||||
addShaped(STELLAR_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', stellarAlloy, 'c', MELODIC_CAPACITOR.getItemStack(), 'C', PRECIENT_CRYSTAL.oreDict);
|
||||
|
||||
addShaped(SILVER_CAPACITOR.getItemStack(), " sr", "sis", "rs ", 'r', "dustRedstone", 's', "ingotSilver", 'i', "ingotLead");
|
||||
addShaped(ENDERGETIC_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', energeticSilver, 'c', SILVER_CAPACITOR.getItemStack(), 'C', "dustCoal");
|
||||
addShaped(ENDERGISED_CAPACITOR.getItemStack(), "iii", "cCc", "iii", 'i', vividAlloy, 'c', ENDERGETIC_CAPACITOR.getItemStack(), 'C', "glowstone");
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
addShaped(BASIC_CAPACITOR.getItemStack(), " gr", "gig", "rg ", 'r', "dustRedstone", 'g', "ingotGold", 'i', ingotCopper);
|
||||
addShaped(ACTIVATED_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', energeticAlloy, 'c', BASIC_CAPACITOR.getItemStack(), 'C', "dustCoal");
|
||||
addShaped(ENDER_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', phasedGold, 'c', ACTIVATED_CAPACITOR.getItemStack(), 'C', "glowstone");
|
||||
|
||||
String prismarine = OreDictionary.doesOreNameExist("shardPrismarine") ? "shardPrismarine": "itemPulsatingCrystal";
|
||||
addShaped(CRYSTALLINE_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', crystallineAlloy, 'c', capacitorEnder, 'C', prismarine);
|
||||
addShaped(MELODIC_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', melodicAlloy, 'c', CRYSTALLINE_CAPACITOR.getItemStack(), 'C', endSteel);
|
||||
addShaped(STELLAR_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', stellarAlloy, 'c', MELODIC_CAPACITOR.getItemStack(), 'C', PRECIENT_CRYSTAL.oreDict);
|
||||
|
||||
addShaped(SILVER_CAPACITOR.getItemStack(), " sr", "sis", "rs ", 'r', "dustRedstone", 's', "ingotSilver", 'i', "ingotLead");
|
||||
addShaped(ENDERGETIC_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', energeticSilver, 'c', SILVER_CAPACITOR.getItemStack(), 'C', "dustCoal");
|
||||
addShaped(ENDERGISED_CAPACITOR.getItemStack(), " i ", "cCc", " i ", 'i', vividAlloy, 'c', ENDERGETIC_CAPACITOR.getItemStack(), 'C', "glowstone");
|
||||
}
|
||||
|
||||
//Conduit Binder
|
||||
ItemStack cbc = BINDER_COMPOSITE.getStack(8);
|
||||
@@ -195,23 +271,6 @@ public class MaterialRecipes {
|
||||
addShaped(gear, "scs", "c c", "scs", 's', "stickWood", 'c', "cobblestone");
|
||||
addShaped(gear, "scs", "c c", "scs", 's', "woodStick", 'c', "cobblestone");
|
||||
|
||||
//Ender Capacitor
|
||||
ItemStack enderCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 2);
|
||||
ItemStack activatedCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 1);
|
||||
if (Config.useHardRecipes) {
|
||||
addShaped(enderCapacitor, "eee", "cgc", "eee", 'e', phasedGold, 'c', activatedCapacitor, 'g', "glowstone");
|
||||
} else {
|
||||
addShaped(enderCapacitor, " e ", "cgc", " e ", 'e', phasedGold, 'c', activatedCapacitor, 'g', "glowstone");
|
||||
}
|
||||
|
||||
//Melodic Capacitor
|
||||
ItemStack melodicCapacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 3);
|
||||
if (Config.useHardRecipes) {
|
||||
addShaped(melodicCapacitor, "eee", "cgc", "eee", 'e', endSteel, 'c', enderCapacitor, 'g', new ItemStack(Items.ender_eye));
|
||||
} else {
|
||||
addShaped(melodicCapacitor, " e ", "cgc", " e ", 'e', endSteel, 'c', enderCapacitor, 'g', new ItemStack(Items.ender_eye));
|
||||
}
|
||||
|
||||
// Weather Crystal
|
||||
ItemStack main = Config.useHardRecipes ? new ItemStack(EnderIO.itemMaterial, 1, Material.VIBRANT_CYSTAL.ordinal()) : new ItemStack(Items.diamond);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(EnderIO.itemMaterial, 1, Material.WEATHER_CRYSTAL.ordinal()), main /* TODO figure out new weather crystal recipe */));
|
||||
@@ -235,6 +294,12 @@ public class MaterialRecipes {
|
||||
addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
}
|
||||
|
||||
for (AlloyEndergy alloy : AlloyEndergy.values()) {
|
||||
addShaped(alloy.getStackBlock(), "iii", "iii", "iii", 'i', alloy.getOreIngot());
|
||||
addShaped(alloy.getStackBall(5), " i ", "iii", " i ", 'i', alloy.getOreIngot());
|
||||
addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
}
|
||||
|
||||
//DS Rod
|
||||
ItemStack darkRod = new ItemStack(EnderIO.itemMaterial, 1, Material.DARK_STEEL_ROD.ordinal());
|
||||
addShaped(darkRod, " ns", "nsn", "sn ", 's', darkSteel,'n', endSteelNugget);
|
||||
@@ -250,32 +315,13 @@ public class MaterialRecipes {
|
||||
|
||||
if (hasCopper()) {
|
||||
ItemStack dustCopper = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal());
|
||||
ItemStack ingotCopper = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_COPPER);
|
||||
GameRegistry.addSmelting(dustCopper, ingotCopper, 0);
|
||||
ItemStack ingotCoppper = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_COPPER);
|
||||
GameRegistry.addSmelting(dustCopper, ingotCoppper, 0);
|
||||
}
|
||||
if (hasTin()) {
|
||||
ItemStack dustTin = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal());
|
||||
ItemStack ingotTin = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_TIN);
|
||||
GameRegistry.addSmelting(dustTin, ingotTin, 0);
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> copperIngots = OreDictionary.getOres("ingotCopper");
|
||||
String gold;
|
||||
if (Config.useHardRecipes) {
|
||||
gold = "ingotGold";
|
||||
} else {
|
||||
gold = "nuggetGold";
|
||||
}
|
||||
if (copperIngots != null && !copperIngots.isEmpty() && Config.useModMetals) {
|
||||
addShaped(capacitor, " gr", "gcg", "rg ", 'r', "dustRedstone", 'g', gold, 'c', "ingotCopper");
|
||||
} else {
|
||||
addShaped(capacitor, " gr", "gig", "rg ", 'r', "dustRedstone", 'g', gold, 'i', "ingotIron");
|
||||
}
|
||||
|
||||
if (Config.useHardRecipes) {
|
||||
addShaped(activatedCapacitor, "eee", "cCc", "eee", 'e', energeticAlloy, 'c', capacitor, 'C', "dustCoal");
|
||||
} else {
|
||||
addShaped(activatedCapacitor, " e ", "cCc", " e ", 'e', energeticAlloy, 'c', capacitor, 'C', "dustCoal");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,36 @@
|
||||
package crazypants.enderio.power;
|
||||
|
||||
public class BasicCapacitor implements ICapacitor {
|
||||
|
||||
|
||||
private int maxEnergyReceived = 40;
|
||||
private int maxEnergyStored = 100000;
|
||||
private int maxEnergyStored = 100000;
|
||||
private int maxEnergyExtracted = 20;
|
||||
private int tier = 1;
|
||||
|
||||
public BasicCapacitor() {
|
||||
}
|
||||
|
||||
public BasicCapacitor(int maxEnergyIO) {
|
||||
this(0, maxEnergyIO, maxEnergyIO, maxEnergyIO);
|
||||
}
|
||||
|
||||
public BasicCapacitor(int maxEnergyIO, int maxEnergyStored) {
|
||||
this(maxEnergyIO, maxEnergyStored, maxEnergyIO);
|
||||
this(0, maxEnergyIO, maxEnergyStored, maxEnergyIO);
|
||||
}
|
||||
|
||||
public BasicCapacitor(int maxEnergyIn, int maxEnergyStored, int maxEnergyOut) {
|
||||
configure(maxEnergyIn, maxEnergyStored, maxEnergyOut);
|
||||
public BasicCapacitor(int tier, int maxEnergyIO, int maxEnergyStored) {
|
||||
this(tier, maxEnergyIO, maxEnergyStored, maxEnergyIO);
|
||||
}
|
||||
|
||||
|
||||
protected void configure(int maxEnergyReceived, int maxEnergyStored, int maxEnergyExtracted) {
|
||||
public BasicCapacitor(int tier, int maxEnergyIn, int maxEnergyStored, int maxEnergyOut) {
|
||||
configure(tier, maxEnergyIn, maxEnergyStored, maxEnergyOut);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void configure(int tier, int maxEnergyReceived, int maxEnergyStored, int maxEnergyExtracted) {
|
||||
this.tier = tier;
|
||||
this.maxEnergyReceived = maxEnergyReceived;
|
||||
this.maxEnergyStored = maxEnergyStored;
|
||||
this.maxEnergyExtracted = maxEnergyExtracted;
|
||||
@@ -42,10 +54,15 @@ public class BasicCapacitor implements ICapacitor {
|
||||
protected void setMaxEnergyStored(int maxEnergyStored) {
|
||||
this.maxEnergyStored = maxEnergyStored;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyExtracted() {
|
||||
return maxEnergyExtracted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier() {
|
||||
return tier;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,28 +6,69 @@ import crazypants.enderio.EnderIO;
|
||||
public enum Capacitors {
|
||||
|
||||
BASIC_CAPACITOR(
|
||||
new BasicCapacitor(80, 100000, 20),
|
||||
"basicCapacitor"),
|
||||
new BasicCapacitor(1, 80, 100000, 20),
|
||||
"basicCapacitor",
|
||||
"Basic"),
|
||||
|
||||
ACTIVATED_CAPACITOR(
|
||||
new BasicCapacitor(240, 200000, 60),
|
||||
"activatedCapacitor"),
|
||||
new BasicCapacitor(2, 240, 200000, 60),
|
||||
"activatedCapacitor",
|
||||
"Advanced"),
|
||||
|
||||
ENDER_CAPACITOR(
|
||||
new BasicCapacitor(400, 500000, 100),
|
||||
"enderCapacitor"),
|
||||
new BasicCapacitor(3, 400, 500000, 100),
|
||||
"enderCapacitor",
|
||||
"Ender"),
|
||||
|
||||
CRYSTALLINE_CAPACITOR(
|
||||
new BasicCapacitor(4, 840, 1000000, 260),
|
||||
"crystallineCapacitor",
|
||||
"Crystalline"),
|
||||
|
||||
MELODIC_CAPACITOR(
|
||||
new BasicCapacitor(640, 1000000, 180),
|
||||
"melodicCapacitor");
|
||||
new BasicCapacitor(5, 1640, 2000000, 460),
|
||||
"melodicCapacitor",
|
||||
"Melodic"),
|
||||
|
||||
STELLAR_CAPACITOR(
|
||||
new BasicCapacitor(6, 3320, 5000000, 980),
|
||||
"stellarCapacitor",
|
||||
"Stellar"),
|
||||
|
||||
TOTEMIC_CAPACITOR(
|
||||
new BasicCapacitor(7, 6600, 10000000, 1900),
|
||||
"totemicCapacitor",
|
||||
"Totemic"),
|
||||
|
||||
SILVER_CAPACITOR(
|
||||
new BasicCapacitor(1, 80, 100000, 20),
|
||||
"silverCapacitor",
|
||||
"Basic"),
|
||||
|
||||
ENDERGETIC_CAPACITOR(
|
||||
new BasicCapacitor(2, 240, 200000, 60),
|
||||
"endergeticCapacitor",
|
||||
"Advanced"),
|
||||
|
||||
ENDERGISED_CAPACITOR(
|
||||
new BasicCapacitor(3, 400, 500000, 100),
|
||||
"endergisedCapacitor",
|
||||
"Ender");
|
||||
|
||||
public final ICapacitor capacitor;
|
||||
public final String unlocalisedName;
|
||||
public final String iconKey;
|
||||
public final String oreDict;
|
||||
|
||||
private Capacitors(ICapacitor capacitor, String unlocalisedName) {
|
||||
private Capacitors(ICapacitor capacitor, String unlocalisedName, String oreDict) {
|
||||
this.capacitor = capacitor;
|
||||
this.unlocalisedName = "enderio." + unlocalisedName;
|
||||
this.iconKey = "enderio:" + unlocalisedName;
|
||||
this.oreDict = oreDict;
|
||||
}
|
||||
|
||||
public String getOreTag() {
|
||||
return "capacitor"+oreDict;
|
||||
}
|
||||
|
||||
public ItemStack getItemStack() {
|
||||
|
||||
@@ -8,4 +8,6 @@ public interface ICapacitor {
|
||||
|
||||
int getMaxEnergyExtracted();
|
||||
|
||||
int getTier();
|
||||
|
||||
}
|
||||