Added Subspace capacitors in place of Anuic energy bank
Added superconductor component Improved capacitive crystal recipes to use items instead of blocks
This commit is contained in:
parent
7d2681d896
commit
8527901c18
5 changed files with 187 additions and 55 deletions
|
@ -2,11 +2,15 @@ package cr0s.warpdrive.block.energy;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import cr0s.warpdrive.config.WarpDriveConfig;
|
||||
import cr0s.warpdrive.item.ItemTuningFork;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -16,18 +20,43 @@ import net.minecraft.world.World;
|
|||
import cr0s.warpdrive.WarpDrive;
|
||||
import cr0s.warpdrive.block.BlockAbstractContainer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockEnergyBank extends BlockAbstractContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public BlockEnergyBank() {
|
||||
super(Material.iron);
|
||||
setBlockName("warpdrive.energy.EnergyBank");
|
||||
setBlockName("warpdrive.energy.EnergyBank.");
|
||||
hasSubBlocks = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int i) {
|
||||
return new TileEntityEnergyBank();
|
||||
public TileEntity createNewTileEntity(World world, int metadata) {
|
||||
return new TileEntityEnergyBank((byte)(metadata % 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metadata) {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTab, List list) {
|
||||
for (byte tier = 0; tier < 4; tier++) {
|
||||
ItemStack itemStack = new ItemStack(item, 1, tier);
|
||||
list.add(itemStack);
|
||||
if (tier > 0) {
|
||||
itemStack = new ItemStack(item, 1, tier);
|
||||
NBTTagCompound nbtTagCompound = new NBTTagCompound();
|
||||
nbtTagCompound.setByte("tier", tier);
|
||||
nbtTagCompound.setInteger("energy", WarpDriveConfig.ENERGY_BANK_MAX_ENERGY_STORED[tier - 1]);
|
||||
itemStack.setTagCompound(nbtTagCompound);
|
||||
list.add(itemStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,6 +82,19 @@ public class BlockEnergyBank extends BlockAbstractContainer {
|
|||
return icons[side == 1 ? 1 : 2];
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getTier(final ItemStack itemStack) {
|
||||
if (itemStack == null || itemStack.getItem() != Item.getItemFromBlock(this)) {
|
||||
return 1;
|
||||
}
|
||||
NBTTagCompound nbtTagCompound = itemStack.getTagCompound();
|
||||
if (nbtTagCompound != null && nbtTagCompound.hasKey("tier")) {
|
||||
return nbtTagCompound.getByte("tier");
|
||||
} else {
|
||||
return (byte) itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
|
@ -70,23 +112,25 @@ public class BlockEnergyBank extends BlockAbstractContainer {
|
|||
if (itemStackHeld == null) {
|
||||
WarpDrive.addChatMessage(entityPlayer, tileEntityEnergyBank.getStatus());
|
||||
return true;
|
||||
|
||||
} else if (itemStackHeld.getItem() instanceof ItemTuningFork) {
|
||||
tileEntityEnergyBank.setMode(facing, (byte)((tileEntityEnergyBank.getMode(facing) + 1) % 3));
|
||||
ItemStack itemStack = new ItemStack(Item.getItemFromBlock(this), 1, world.getBlockMetadata(x, y, z));
|
||||
switch (tileEntityEnergyBank.getMode(facing)) {
|
||||
case TileEntityEnergyBank.MODE_INPUT:
|
||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||
getLocalizedName())
|
||||
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToInput", facing.name()));
|
||||
return true;
|
||||
case TileEntityEnergyBank.MODE_OUTPUT:
|
||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||
getLocalizedName())
|
||||
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToOutput", facing.name()));
|
||||
return true;
|
||||
case TileEntityEnergyBank.MODE_DISABLED:
|
||||
default:
|
||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||
getLocalizedName())
|
||||
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToDisabled", facing.name()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,23 +15,58 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy {
|
|||
static final byte MODE_INPUT = 1;
|
||||
static final byte MODE_OUTPUT = 2;
|
||||
private static final byte[] MODE_DEFAULT_SIDES = { MODE_INPUT, MODE_INPUT, MODE_OUTPUT, MODE_OUTPUT, MODE_OUTPUT, MODE_OUTPUT };
|
||||
|
||||
// persistent properties
|
||||
private byte tier = -1;
|
||||
private byte[] modeSide = MODE_DEFAULT_SIDES.clone();
|
||||
|
||||
public TileEntityEnergyBank() {
|
||||
this((byte) 1);
|
||||
}
|
||||
|
||||
public TileEntityEnergyBank(final byte tier) {
|
||||
super();
|
||||
IC2_sinkTier = 0;
|
||||
IC2_sourceTier = 0;
|
||||
this.tier = tier;
|
||||
peripheralName = "warpdriveEnergyBank";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFirstUpdateTick() {
|
||||
if (tier == 0) {
|
||||
IC2_sinkTier = Integer.MAX_VALUE;
|
||||
IC2_sourceTier = Integer.MAX_VALUE;
|
||||
} else {
|
||||
IC2_sinkTier = WarpDriveConfig.ENERGY_BANK_IC2_TIER[tier - 1];
|
||||
IC2_sourceTier = WarpDriveConfig.ENERGY_BANK_IC2_TIER[tier - 1];
|
||||
}
|
||||
super.onFirstUpdateTick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energy_getEnergyStored() {
|
||||
if (tier == 0) {
|
||||
return WarpDriveConfig.ENERGY_BANK_MAX_ENERGY_STORED[2] / 2;
|
||||
} else {
|
||||
return super.energy_getEnergyStored();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energy_getPotentialOutput() {
|
||||
return energy_getEnergyStored();
|
||||
if (tier == 0) {
|
||||
return Integer.MAX_VALUE;
|
||||
} else {
|
||||
return Math.min(energy_getEnergyStored(), WarpDriveConfig.ENERGY_BANK_TRANSFER_PER_TICK[tier - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energy_getMaxStorage() {
|
||||
return WarpDriveConfig.ENERGY_BANK_MAX_ENERGY_STORED;
|
||||
if (tier == 0) {
|
||||
return WarpDriveConfig.ENERGY_BANK_MAX_ENERGY_STORED[2];
|
||||
} else {
|
||||
return WarpDriveConfig.ENERGY_BANK_MAX_ENERGY_STORED[tier - 1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,15 +91,17 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy {
|
|||
|
||||
// Forge overrides
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setByteArray("modeSide", modeSide);
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
nbtTagCompound.setByte("tier", tier);
|
||||
nbtTagCompound.setByteArray("modeSide", modeSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
modeSide = nbt.getByteArray("modeSide");
|
||||
public void readFromNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.readFromNBT(nbtTagCompound);
|
||||
tier = nbtTagCompound.getByte("tier");
|
||||
modeSide = nbtTagCompound.getByteArray("modeSide");
|
||||
if (modeSide == null || modeSide.length != 6) {
|
||||
modeSide = MODE_DEFAULT_SIDES.clone();
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ public class Recipes {
|
|||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE)));
|
||||
|
||||
// Power Store
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank), false, "ipi", "isi", "ici",
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1), false, "ipi", "isi", "ici",
|
||||
'i', Items.iron_ingot,
|
||||
's', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
||||
'c', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE),
|
||||
|
@ -693,38 +693,35 @@ public class Recipes {
|
|||
|
||||
// Power interface is 4 redstone, 2 iron ingot, 3 gold ingot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.POWER_INTERFACE, 2), false, "rgr", "igi", "rgr",
|
||||
'g', Items.gold_ingot,
|
||||
'g', "ingotGold",
|
||||
'r', Items.redstone,
|
||||
'i', Items.iron_ingot));
|
||||
|
||||
// Capacitive crystal is 3 redstone block, 3 paper, 3 lapis block or 1 HV capacitor from IE or 1 MFE from IC2
|
||||
if (OreDictionary.doesOreNameExist("dustLithium") && !OreDictionary.getOres("dustLithium").isEmpty()) {// comes with GregTech and Industrial Craft 2
|
||||
if (OreDictionary.doesOreNameExist("dustLithium") && !OreDictionary.getOres("dustLithium").isEmpty()) {// comes with GregTech, Industrial Craft 2 and Mekanism
|
||||
// (Lithium is processed from nether quartz)
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "plp", "lRl", "plp",
|
||||
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II
|
||||
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II (ghast tear + glowstone)
|
||||
'l', "dustLithium",
|
||||
'p', Items.paper));
|
||||
} else if (WarpDriveConfig.isImmersiveEngineeringLoaded) {
|
||||
ItemStack itemStackCapacitorHV = WarpDriveConfig.getModItemStack("ImmersiveEngineering", "metalDevice", 7);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
||||
'm', itemStackCapacitorHV,
|
||||
'p', Items.paper));
|
||||
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
|
||||
ItemStack itemStackHardenedEnergyCell = WarpDriveConfig.getModItemStack("ThermalExpansion", "Cell", 2);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
||||
'm', itemStackHardenedEnergyCell,
|
||||
'p', Items.paper));
|
||||
} else if (WarpDriveConfig.isEnderIOLoaded) {
|
||||
ItemStack itemStackBasicCapacitorBank = WarpDriveConfig.getModItemStack("EnderIO", "blockCapBank", 1);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
||||
'm', itemStackBasicCapacitorBank,
|
||||
'p', Items.paper));
|
||||
} else if (OreDictionary.doesOreNameExist("dustElectrum") && !OreDictionary.getOres("dustElectrum").isEmpty()) {// comes with ImmersiveEngineering, ThermalFoundation, Metallurgy
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "prp", "eRe", "prp",
|
||||
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II (ghast tear + glowstone)
|
||||
'r', "blockRedstone",
|
||||
'e', "dustElectrum",
|
||||
'p', Items.paper));
|
||||
} else if (OreDictionary.doesOreNameExist("ingotElectricalSteel") && !OreDictionary.getOres("ingotElectricalSteel").isEmpty()) {// comes with EnderIO
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "prp", "eRe", "prp",
|
||||
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II (ghast tear + glowstone)
|
||||
'r', "blockRedstone",
|
||||
'e', "ingotElectricalSteel",
|
||||
'p', Items.paper));
|
||||
} else {// Vanilla
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "qrq", "pSp", "qrq",
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "prp", "gSg", "prp",
|
||||
'S', new ItemStack(Items.potionitem, 1, 8265), // Strength I long (blaze powder + redstone)
|
||||
'r', Blocks.redstone_block,
|
||||
'r', "blockRedstone",
|
||||
'p', Items.paper,
|
||||
'q', Items.quartz));
|
||||
'g', "ingotGold"));
|
||||
}
|
||||
|
||||
// Air canister is 4 iron bars, 2 leather/rubber, 2 yellow wool, 1 tank
|
||||
|
@ -753,19 +750,19 @@ public class Recipes {
|
|||
'd', "lensDiamond"));
|
||||
} else {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
||||
'g', Items.gold_ingot,
|
||||
'g', "ingotGold",
|
||||
'p', "paneGlassColorless",
|
||||
'd', "lensDiamond"));
|
||||
}
|
||||
} else if (WarpDriveConfig.isAdvancedRepulsionSystemLoaded) {
|
||||
ItemStack diamondLens = WarpDriveConfig.getModItemStack("AdvancedRepulsionSystems", "{A8F3AF2F-0384-4EAA-9486-8F7E7A1B96E7}", 1);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
||||
'g', Items.gold_ingot,
|
||||
'g', "ingotGold",
|
||||
'p', "paneGlassColorless",
|
||||
'd', diamondLens));
|
||||
} else {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.LENS, 2), false, " g ", "pdp", " g ",
|
||||
'g', Items.gold_ingot,
|
||||
'g', "ingotGold",
|
||||
'p', "paneGlassColorless",
|
||||
'd', "gemDiamond"));
|
||||
}
|
||||
|
@ -862,6 +859,18 @@ public class Recipes {
|
|||
'm', ItemComponent.getItemStack(EnumComponentType.MOTOR),
|
||||
'c', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE)));
|
||||
|
||||
// Superconductor is 1 Ender crystal, 4 Power interface, 4 Cryotheum dust/Lapis block/10k Coolant cell
|
||||
Object oreCoolant = "blockLapis";
|
||||
if (WarpDriveConfig.isThermalExpansionLoaded) {
|
||||
oreCoolant = "dustCryotheum";
|
||||
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
|
||||
oreCoolant = WarpDriveConfig.getModItemStack("IC2", "reactorCoolantSimple", -1);
|
||||
}
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.SUPERCONDUCTOR), false, "pcp", "cec", "pcp",
|
||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE),
|
||||
'e', ItemComponent.getItemStack(EnumComponentType.ENDER_CRYSTAL),
|
||||
'c', oreCoolant ));
|
||||
|
||||
// *** Force field shapes
|
||||
// Force field shapes are 1 Memory crystal, 3 to 5 Coil crystal
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldShape.getItemStack(EnumForceFieldShape.SPHERE), false, " ", "CmC", "CCC",
|
||||
|
@ -890,7 +899,7 @@ public class Recipes {
|
|||
// Force field attraction upgrade is 3 Coil crystal, 1 Iron block, 2 Redstone block, 1 MV motor
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.ATTRACTION), false, "CCC", "rir", " m ",
|
||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||
'r', Blocks.redstone_block,
|
||||
'r', "blockRedstone",
|
||||
'i', Blocks.iron_block,
|
||||
'm', itemStackMotorMV));
|
||||
// Force field breaking upgrade is 3 Coil crystal, 1 Diamond axe, 1 diamond shovel, 1 diamond pick
|
||||
|
@ -943,11 +952,11 @@ public class Recipes {
|
|||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.RANGE), false, "CCC", "RMR", " ",
|
||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||
'M', ItemComponent.getItemStack(EnumComponentType.MEMORY_CRYSTAL),
|
||||
'R', Blocks.redstone_block));
|
||||
'R', "blockRedstone"));
|
||||
// Force field repulsion upgrade is 3 Coil crystal, 1 Iron block, 2 Redstone block, 1 MV motor
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.REPULSION), false, " m ", "rir", "CCC",
|
||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||
'r', Blocks.redstone_block,
|
||||
'r', "blockRedstone",
|
||||
'i', Blocks.iron_block,
|
||||
'm', itemStackMotorMV));
|
||||
// Force field rotation upgrade is 3 Coil crystal, 2 MV Motors, 1 Computer interface
|
||||
|
@ -968,7 +977,7 @@ public class Recipes {
|
|||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.STABILIZATION), "CCC", "lMl", " ",
|
||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||
'M', ItemComponent.getItemStack(EnumComponentType.MEMORY_CRYSTAL),
|
||||
'l', Blocks.lapis_block));
|
||||
'l', "blockLapis"));
|
||||
// Force field thickness upgrade is 8 Coil crystal, 1 Diamond crystal
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.THICKNESS), false, "CCC", "CpC", " ",
|
||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||
|
@ -1076,8 +1085,8 @@ public class Recipes {
|
|||
// TODO: add fluid transposer/canning support
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockLaserMedium), false, "lrl", "rmr", "lrl",
|
||||
'm', ItemComponent.getItemStack(EnumComponentType.LASER_MEDIUM_EMPTY),
|
||||
'r', Blocks.redstone_block,
|
||||
'l', Blocks.lapis_block));
|
||||
'r', "blockRedstone",
|
||||
'l', "blockLapis"));
|
||||
|
||||
// Laser lift is ...
|
||||
Object oreMagnetizer = itemStackMachineCasings[0];
|
||||
|
@ -1297,12 +1306,35 @@ public class Recipes {
|
|||
'g', "paneGlassColorless",
|
||||
'h', "blockHull2_plain"));
|
||||
|
||||
// Anuic Energy bank is 1 capacitive crystal + 1 MV Machine casing + 3 Power interfaces
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank), false, "pip", "pcp", "pmp",
|
||||
// Basic Energy bank is 1 Capacitive crystal + 1 Power interface + 3 paper + 4 iron bars
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 1), false, "iPi", "pcp", "ipi",
|
||||
'c', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
||||
'm', itemStackMachineCasings[1],
|
||||
'i', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE),
|
||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE)));
|
||||
'i', ironBars,
|
||||
'p', Items.paper,
|
||||
'P', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE) ));
|
||||
|
||||
// Advanced Energy bank is 4 Basic energy bank + 1 Power interface
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 2), false, " c ", "cpc", " c ",
|
||||
'c', new ItemStack(WarpDrive.blockEnergyBank, 1, 1),
|
||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE) ));
|
||||
// or 4 Capacitive crystal + 1 Gold ingot + 4 Power interface
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 2), false, "pcp", "cgc", "pcp",
|
||||
'c', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
||||
'g', "ingotGold",
|
||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE) ));
|
||||
|
||||
// Superior Energy bank is 4 Advanced energy bank + 1 Ender tuned crystal + 4 Iron ingot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 3), false, "ici", "cec", "ici",
|
||||
'c', new ItemStack(WarpDrive.blockEnergyBank, 1, 2),
|
||||
'i', "ingotIron",
|
||||
'e', ItemComponent.getItemStack(EnumComponentType.ENDER_CRYSTAL) ));
|
||||
// or 4 Capacitive crystal block + 1 Superconductor + 4 Iron ingot
|
||||
/*
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 3), false, "ici", "csc", "ici",
|
||||
'c', @TODO MC1.10 Capacitive crystal block,
|
||||
'i', "ingotIron",
|
||||
's', ItemComponent.getItemStack(EnumComponentType.SUPERCONDUCTOR) ));
|
||||
/**/
|
||||
|
||||
// Force field projector is 1 or 2 Electromagnetic Projector + 1 LV/MV/HV Machine casing + 1 Ender crystal + 1 Redstone
|
||||
for (int tier = 1; tier <= 3; tier++) {
|
||||
|
|
|
@ -278,7 +278,9 @@ public class WarpDriveConfig {
|
|||
public static int ENAN_REACTOR_MAX_LASERS_PER_SECOND = 6;
|
||||
|
||||
// Power store
|
||||
public static int ENERGY_BANK_MAX_ENERGY_STORED = 1000000;
|
||||
public static int[] ENERGY_BANK_MAX_ENERGY_STORED = { 800000, 4000000, 20000000 };
|
||||
public static int[] ENERGY_BANK_IC2_TIER = { 2, 3, 4 };
|
||||
public static int[] ENERGY_BANK_TRANSFER_PER_TICK = { 200, 1000, 5000 };
|
||||
|
||||
// Laser lift
|
||||
public static int LIFT_MAX_ENERGY_STORED = 900;
|
||||
|
@ -719,7 +721,23 @@ public class WarpDriveConfig {
|
|||
config.get("enantiomorphic_reactor", "max_lasers", ENAN_REACTOR_MAX_LASERS_PER_SECOND, "Maximum number of stabilisation laser shots per seconds before loosing efficiency").getInt());
|
||||
|
||||
// Energy bank
|
||||
ENERGY_BANK_MAX_ENERGY_STORED = config.get("energy_bank", "max_energy_stored", ENERGY_BANK_MAX_ENERGY_STORED, "Maximum energy stored").getInt();
|
||||
ENERGY_BANK_MAX_ENERGY_STORED = config.get("energy_bank", "max_energy_stored", ENERGY_BANK_MAX_ENERGY_STORED, "Maximum energy stored for each energy bank").getIntList();
|
||||
assert(ENERGY_BANK_MAX_ENERGY_STORED.length == 3);
|
||||
ENERGY_BANK_MAX_ENERGY_STORED[0] = clamp( 0, ENERGY_BANK_MAX_ENERGY_STORED[1], ENERGY_BANK_MAX_ENERGY_STORED[0]);
|
||||
ENERGY_BANK_MAX_ENERGY_STORED[1] = clamp(ENERGY_BANK_MAX_ENERGY_STORED[0], ENERGY_BANK_MAX_ENERGY_STORED[2], ENERGY_BANK_MAX_ENERGY_STORED[1]);
|
||||
ENERGY_BANK_MAX_ENERGY_STORED[2] = clamp(ENERGY_BANK_MAX_ENERGY_STORED[1], Integer.MAX_VALUE , ENERGY_BANK_MAX_ENERGY_STORED[2]);
|
||||
|
||||
ENERGY_BANK_IC2_TIER = config.get("energy_bank", "ic2_tier", ENERGY_BANK_IC2_TIER, "IC2 energy tier for each energy bank (0 is BatBox, etc.)").getIntList();
|
||||
assert(ENERGY_BANK_IC2_TIER.length == 3);
|
||||
ENERGY_BANK_IC2_TIER[0] = clamp( 0, ENERGY_BANK_IC2_TIER[1], ENERGY_BANK_IC2_TIER[0]);
|
||||
ENERGY_BANK_IC2_TIER[1] = clamp(ENERGY_BANK_IC2_TIER[0], ENERGY_BANK_IC2_TIER[2], ENERGY_BANK_IC2_TIER[1]);
|
||||
ENERGY_BANK_IC2_TIER[2] = clamp(ENERGY_BANK_IC2_TIER[1], Integer.MAX_VALUE , ENERGY_BANK_IC2_TIER[2]);
|
||||
|
||||
ENERGY_BANK_TRANSFER_PER_TICK = config.get("energy_bank", "transfer_per_tick", ENERGY_BANK_TRANSFER_PER_TICK, "Internal energy transferred per tick for each energy bank").getIntList();
|
||||
assert(ENERGY_BANK_TRANSFER_PER_TICK.length == 3);
|
||||
ENERGY_BANK_TRANSFER_PER_TICK[0] = clamp( 0, ENERGY_BANK_TRANSFER_PER_TICK[1], ENERGY_BANK_TRANSFER_PER_TICK[0]);
|
||||
ENERGY_BANK_TRANSFER_PER_TICK[1] = clamp(ENERGY_BANK_TRANSFER_PER_TICK[0], ENERGY_BANK_TRANSFER_PER_TICK[2], ENERGY_BANK_TRANSFER_PER_TICK[1]);
|
||||
ENERGY_BANK_TRANSFER_PER_TICK[2] = clamp(ENERGY_BANK_TRANSFER_PER_TICK[1], Integer.MAX_VALUE , ENERGY_BANK_TRANSFER_PER_TICK[2]);
|
||||
|
||||
// Lift
|
||||
LIFT_MAX_ENERGY_STORED = clamp(1, Integer.MAX_VALUE,
|
||||
|
|
|
@ -22,7 +22,8 @@ public enum EnumComponentType {
|
|||
ACTIVATED_CARBON ("ActivatedCarbon"),
|
||||
LASER_MEDIUM_EMPTY ("LaserMediumEmpty"),
|
||||
COIL_CRYSTAL ("CoilCrystal"),
|
||||
ELECTROMAGNETIC_PROJECTOR ("ElectromagneticProjector");
|
||||
ELECTROMAGNETIC_PROJECTOR ("ElectromagneticProjector"),
|
||||
SUPERCONDUCTOR ("Superconductor");
|
||||
|
||||
public final String unlocalizedName;
|
||||
|
||||
|
|
Loading…
Reference in a new issue