Code cleanup
This commit is contained in:
parent
b1174bfad5
commit
2a2d86318f
3 changed files with 24 additions and 45 deletions
|
@ -125,17 +125,17 @@ public abstract class TileEntityAbstractEnergy extends TileEntityAbstractInterfa
|
|||
public boolean consumeEnergy(int amount_internal, boolean simulate) {
|
||||
int amountUpgraded = amount_internal;
|
||||
if (upgrades.containsKey(EnumUpgradeTypes.Power)) {
|
||||
double valueMul = Math.pow(0.8,upgrades.get(EnumUpgradeTypes.Power));
|
||||
double valueMul = Math.pow(0.8, upgrades.get(EnumUpgradeTypes.Power));
|
||||
amountUpgraded = (int) Math.ceil(valueMul * amountUpgraded);
|
||||
}
|
||||
|
||||
if (upgrades.containsKey(EnumUpgradeTypes.Range)) {
|
||||
double valueMul = Math.pow(1.2,upgrades.get(EnumUpgradeTypes.Range));
|
||||
double valueMul = Math.pow(1.2, upgrades.get(EnumUpgradeTypes.Range));
|
||||
amountUpgraded = (int) Math.ceil(valueMul * amountUpgraded);
|
||||
}
|
||||
|
||||
if (upgrades.containsKey(EnumUpgradeTypes.Speed)) {
|
||||
double valueMul = Math.pow(1.2,upgrades.get(EnumUpgradeTypes.Speed));
|
||||
double valueMul = Math.pow(1.2, upgrades.get(EnumUpgradeTypes.Speed));
|
||||
amountUpgraded = (int) Math.ceil(valueMul * amountUpgraded);
|
||||
}
|
||||
// FIXME: upgrades balancing & implementation to be done...
|
||||
|
|
|
@ -172,28 +172,7 @@ public abstract class TileEntityAbstractMiner extends TileEntityAbstractLaser
|
|||
return false;
|
||||
}
|
||||
|
||||
private boolean canDig(Block block, int x, int y, int z) {// not used
|
||||
// ignore air & fluids
|
||||
if (block == null || (worldObj.isAirBlock(x, y, z) || (block instanceof IFluidBlock))) {
|
||||
return false;
|
||||
}
|
||||
// check blacklist
|
||||
if (block.isAssociatedBlock(Blocks.bedrock)) {
|
||||
return false;
|
||||
}
|
||||
if (WarpDriveConfig.forceFieldBlocks.contains(block)) {
|
||||
// isMining = false;
|
||||
return false;
|
||||
}
|
||||
// check whitelist
|
||||
// WarpDriveConfig.MinerOres.contains(blockID) then true ?
|
||||
else if (block.isAssociatedBlock(WarpDrive.blockIridium)) {
|
||||
return true;
|
||||
}
|
||||
// check default
|
||||
else if (block.getExplosionResistance(null) <= Blocks.obsidian.getExplosionResistance(null)) {
|
||||
return true;
|
||||
}
|
||||
private boolean canDig(Block block, int x, int y, int z) {// not used, should be abstract
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,16 +177,16 @@ public class Recipes {
|
|||
}
|
||||
|
||||
public static void initIC2() {
|
||||
ItemStack advancedAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartAlloy", -1).copy();
|
||||
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", -1).copy();
|
||||
ItemStack advancedMachine = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 12).copy();
|
||||
ItemStack miner = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 7).copy();
|
||||
ItemStack magnetizer = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 9).copy();
|
||||
ItemStack fiberGlassCable = WarpDriveConfig.getModItemStack("IC2", "itemCable", 9).copy();
|
||||
ItemStack circuit = WarpDriveConfig.getModItemStack("IC2", "itemPartCircuit", -1).copy();
|
||||
ItemStack advancedCircuit = WarpDriveConfig.getModItemStack("IC2", "itemPartCircuitAdv", -1).copy();
|
||||
ItemStack ironPlate = WarpDriveConfig.getModItemStack("IC2", "itemPlates", 4).copy();
|
||||
ItemStack mfe = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 1).copy();
|
||||
ItemStack advancedAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartAlloy", -1);
|
||||
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", -1);
|
||||
ItemStack advancedMachine = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 12);
|
||||
ItemStack miner = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 7);
|
||||
ItemStack magnetizer = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 9);
|
||||
ItemStack fiberGlassCable = WarpDriveConfig.getModItemStack("IC2", "itemCable", 9);
|
||||
ItemStack circuit = WarpDriveConfig.getModItemStack("IC2", "itemPartCircuit", -1);
|
||||
ItemStack advancedCircuit = WarpDriveConfig.getModItemStack("IC2", "itemPartCircuitAdv", -1);
|
||||
ItemStack ironPlate = WarpDriveConfig.getModItemStack("IC2", "itemPlates", 4);
|
||||
ItemStack mfe = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 1);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(WarpDrive.blockShipCore), "ici", "cmc", "ici",
|
||||
'i', iridiumAlloy,
|
||||
|
@ -296,16 +296,16 @@ public class Recipes {
|
|||
}
|
||||
|
||||
public static void initHardIC2() {
|
||||
ItemStack advancedAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartAlloy", -1).copy();
|
||||
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", -1).copy();
|
||||
ItemStack advancedMachine = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 12).copy();
|
||||
ItemStack magnetizer = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 9).copy();
|
||||
ItemStack fiberGlassCable = WarpDriveConfig.getModItemStack("IC2", "itemCable", 9).copy();
|
||||
ItemStack mfe = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 1).copy();
|
||||
ItemStack mfsu = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 2).copy();
|
||||
ItemStack energiumDust = WarpDriveConfig.getModItemStack("IC2", "itemDust2", 2).copy();
|
||||
ItemStack crystalmemory = WarpDriveConfig.getModItemStack("IC2", "itemcrystalmemory", -1).copy();
|
||||
ItemStack itemHAMachine = new ItemStack(WarpDrive.blockHighlyAdvancedMachine).copy();
|
||||
ItemStack advancedAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartAlloy", -1);
|
||||
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", -1);
|
||||
ItemStack advancedMachine = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 12);
|
||||
ItemStack magnetizer = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 9);
|
||||
ItemStack fiberGlassCable = WarpDriveConfig.getModItemStack("IC2", "itemCable", 9);
|
||||
ItemStack mfe = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 1);
|
||||
ItemStack mfsu = WarpDriveConfig.getModItemStack("IC2", "blockElectric", 2);
|
||||
ItemStack energiumDust = WarpDriveConfig.getModItemStack("IC2", "itemDust2", 2);
|
||||
ItemStack crystalmemory = WarpDriveConfig.getModItemStack("IC2", "itemcrystalmemory", -1);
|
||||
ItemStack itemHAMachine = new ItemStack(WarpDrive.blockHighlyAdvancedMachine);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(WarpDrive.blockShipCore),"uau", "tmt", "uau",
|
||||
'a', advancedAlloy,
|
||||
|
|
Loading…
Reference in a new issue