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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import cr0s.warpdrive.config.WarpDriveConfig;
|
||||||
import cr0s.warpdrive.item.ItemTuningFork;
|
import cr0s.warpdrive.item.ItemTuningFork;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
@ -16,18 +20,43 @@ import net.minecraft.world.World;
|
||||||
import cr0s.warpdrive.WarpDrive;
|
import cr0s.warpdrive.WarpDrive;
|
||||||
import cr0s.warpdrive.block.BlockAbstractContainer;
|
import cr0s.warpdrive.block.BlockAbstractContainer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockEnergyBank extends BlockAbstractContainer {
|
public class BlockEnergyBank extends BlockAbstractContainer {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
||||||
public BlockEnergyBank() {
|
public BlockEnergyBank() {
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
setBlockName("warpdrive.energy.EnergyBank");
|
setBlockName("warpdrive.energy.EnergyBank.");
|
||||||
|
hasSubBlocks = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int i) {
|
public TileEntity createNewTileEntity(World world, int metadata) {
|
||||||
return new TileEntityEnergyBank();
|
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
|
@Override
|
||||||
|
@ -53,6 +82,19 @@ public class BlockEnergyBank extends BlockAbstractContainer {
|
||||||
return icons[side == 1 ? 1 : 2];
|
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
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) {
|
||||||
if (world.isRemote) {
|
if (world.isRemote) {
|
||||||
|
@ -70,23 +112,25 @@ public class BlockEnergyBank extends BlockAbstractContainer {
|
||||||
if (itemStackHeld == null) {
|
if (itemStackHeld == null) {
|
||||||
WarpDrive.addChatMessage(entityPlayer, tileEntityEnergyBank.getStatus());
|
WarpDrive.addChatMessage(entityPlayer, tileEntityEnergyBank.getStatus());
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else if (itemStackHeld.getItem() instanceof ItemTuningFork) {
|
} else if (itemStackHeld.getItem() instanceof ItemTuningFork) {
|
||||||
tileEntityEnergyBank.setMode(facing, (byte)((tileEntityEnergyBank.getMode(facing) + 1) % 3));
|
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)) {
|
switch (tileEntityEnergyBank.getMode(facing)) {
|
||||||
case TileEntityEnergyBank.MODE_INPUT:
|
case TileEntityEnergyBank.MODE_INPUT:
|
||||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||||
getLocalizedName())
|
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToInput", facing.name()));
|
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToInput", facing.name()));
|
||||||
return true;
|
return true;
|
||||||
case TileEntityEnergyBank.MODE_OUTPUT:
|
case TileEntityEnergyBank.MODE_OUTPUT:
|
||||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||||
getLocalizedName())
|
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToOutput", facing.name()));
|
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToOutput", facing.name()));
|
||||||
return true;
|
return true;
|
||||||
case TileEntityEnergyBank.MODE_DISABLED:
|
case TileEntityEnergyBank.MODE_DISABLED:
|
||||||
default:
|
default:
|
||||||
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
WarpDrive.addChatMessage(entityPlayer, StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
|
||||||
getLocalizedName())
|
StatCollector.translateToLocalFormatted(itemStack.getUnlocalizedName() + ".name"))
|
||||||
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToDisabled", facing.name()));
|
+ StatCollector.translateToLocalFormatted("warpdrive.energy.side.changedToDisabled", facing.name()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,23 +15,58 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy {
|
||||||
static final byte MODE_INPUT = 1;
|
static final byte MODE_INPUT = 1;
|
||||||
static final byte MODE_OUTPUT = 2;
|
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 };
|
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();
|
private byte[] modeSide = MODE_DEFAULT_SIDES.clone();
|
||||||
|
|
||||||
public TileEntityEnergyBank() {
|
public TileEntityEnergyBank() {
|
||||||
|
this((byte) 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntityEnergyBank(final byte tier) {
|
||||||
super();
|
super();
|
||||||
IC2_sinkTier = 0;
|
this.tier = tier;
|
||||||
IC2_sourceTier = 0;
|
|
||||||
peripheralName = "warpdriveEnergyBank";
|
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
|
@Override
|
||||||
public int energy_getPotentialOutput() {
|
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
|
@Override
|
||||||
public int energy_getMaxStorage() {
|
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
|
@Override
|
||||||
|
@ -56,15 +91,17 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy {
|
||||||
|
|
||||||
// Forge overrides
|
// Forge overrides
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound nbt) {
|
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||||
super.writeToNBT(nbt);
|
super.writeToNBT(nbtTagCompound);
|
||||||
nbt.setByteArray("modeSide", modeSide);
|
nbtTagCompound.setByte("tier", tier);
|
||||||
|
nbtTagCompound.setByteArray("modeSide", modeSide);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbt) {
|
public void readFromNBT(NBTTagCompound nbtTagCompound) {
|
||||||
super.readFromNBT(nbt);
|
super.readFromNBT(nbtTagCompound);
|
||||||
modeSide = nbt.getByteArray("modeSide");
|
tier = nbtTagCompound.getByte("tier");
|
||||||
|
modeSide = nbtTagCompound.getByteArray("modeSide");
|
||||||
if (modeSide == null || modeSide.length != 6) {
|
if (modeSide == null || modeSide.length != 6) {
|
||||||
modeSide = MODE_DEFAULT_SIDES.clone();
|
modeSide = MODE_DEFAULT_SIDES.clone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class Recipes {
|
||||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE)));
|
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE)));
|
||||||
|
|
||||||
// Power Store
|
// 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,
|
'i', Items.iron_ingot,
|
||||||
's', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
's', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
||||||
'c', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE),
|
'c', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE),
|
||||||
|
@ -693,38 +693,35 @@ public class Recipes {
|
||||||
|
|
||||||
// Power interface is 4 redstone, 2 iron ingot, 3 gold ingot
|
// 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",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.POWER_INTERFACE, 2), false, "rgr", "igi", "rgr",
|
||||||
'g', Items.gold_ingot,
|
'g', "ingotGold",
|
||||||
'r', Items.redstone,
|
'r', Items.redstone,
|
||||||
'i', Items.iron_ingot));
|
'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
|
// 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)
|
// (Lithium is processed from nether quartz)
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "plp", "lRl", "plp",
|
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",
|
'l', "dustLithium",
|
||||||
'p', Items.paper));
|
'p', Items.paper));
|
||||||
} else if (WarpDriveConfig.isImmersiveEngineeringLoaded) {
|
} else if (OreDictionary.doesOreNameExist("dustElectrum") && !OreDictionary.getOres("dustElectrum").isEmpty()) {// comes with ImmersiveEngineering, ThermalFoundation, Metallurgy
|
||||||
ItemStack itemStackCapacitorHV = WarpDriveConfig.getModItemStack("ImmersiveEngineering", "metalDevice", 7);
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "prp", "eRe", "prp",
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II (ghast tear + glowstone)
|
||||||
'm', itemStackCapacitorHV,
|
'r', "blockRedstone",
|
||||||
'p', Items.paper));
|
'e', "dustElectrum",
|
||||||
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
|
'p', Items.paper));
|
||||||
ItemStack itemStackHardenedEnergyCell = WarpDriveConfig.getModItemStack("ThermalExpansion", "Cell", 2);
|
} else if (OreDictionary.doesOreNameExist("ingotElectricalSteel") && !OreDictionary.getOres("ingotElectricalSteel").isEmpty()) {// comes with EnderIO
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, "prp", "eRe", "prp",
|
||||||
'm', itemStackHardenedEnergyCell,
|
'R', new ItemStack(Items.potionitem, 1, 8225), // Regeneration II (ghast tear + glowstone)
|
||||||
'p', Items.paper));
|
'r', "blockRedstone",
|
||||||
} else if (WarpDriveConfig.isEnderIOLoaded) {
|
'e', "ingotElectricalSteel",
|
||||||
ItemStack itemStackBasicCapacitorBank = WarpDriveConfig.getModItemStack("EnderIO", "blockCapBank", 1);
|
'p', Items.paper));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.CAPACITIVE_CRYSTAL, 2), false, " m ", "ppp", " m ",
|
|
||||||
'm', itemStackBasicCapacitorBank,
|
|
||||||
'p', Items.paper));
|
|
||||||
} else {// Vanilla
|
} 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)
|
'S', new ItemStack(Items.potionitem, 1, 8265), // Strength I long (blaze powder + redstone)
|
||||||
'r', Blocks.redstone_block,
|
'r', "blockRedstone",
|
||||||
'p', Items.paper,
|
'p', Items.paper,
|
||||||
'q', Items.quartz));
|
'g', "ingotGold"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Air canister is 4 iron bars, 2 leather/rubber, 2 yellow wool, 1 tank
|
// Air canister is 4 iron bars, 2 leather/rubber, 2 yellow wool, 1 tank
|
||||||
|
@ -753,19 +750,19 @@ public class Recipes {
|
||||||
'd', "lensDiamond"));
|
'd', "lensDiamond"));
|
||||||
} else {
|
} else {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
||||||
'g', Items.gold_ingot,
|
'g', "ingotGold",
|
||||||
'p', "paneGlassColorless",
|
'p', "paneGlassColorless",
|
||||||
'd', "lensDiamond"));
|
'd', "lensDiamond"));
|
||||||
}
|
}
|
||||||
} else if (WarpDriveConfig.isAdvancedRepulsionSystemLoaded) {
|
} else if (WarpDriveConfig.isAdvancedRepulsionSystemLoaded) {
|
||||||
ItemStack diamondLens = WarpDriveConfig.getModItemStack("AdvancedRepulsionSystems", "{A8F3AF2F-0384-4EAA-9486-8F7E7A1B96E7}", 1);
|
ItemStack diamondLens = WarpDriveConfig.getModItemStack("AdvancedRepulsionSystems", "{A8F3AF2F-0384-4EAA-9486-8F7E7A1B96E7}", 1);
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.LENS), false, " g ", "pdp", " g ",
|
||||||
'g', Items.gold_ingot,
|
'g', "ingotGold",
|
||||||
'p', "paneGlassColorless",
|
'p', "paneGlassColorless",
|
||||||
'd', diamondLens));
|
'd', diamondLens));
|
||||||
} else {
|
} else {
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.LENS, 2), false, " g ", "pdp", " g ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStackNoCache(EnumComponentType.LENS, 2), false, " g ", "pdp", " g ",
|
||||||
'g', Items.gold_ingot,
|
'g', "ingotGold",
|
||||||
'p', "paneGlassColorless",
|
'p', "paneGlassColorless",
|
||||||
'd', "gemDiamond"));
|
'd', "gemDiamond"));
|
||||||
}
|
}
|
||||||
|
@ -862,6 +859,18 @@ public class Recipes {
|
||||||
'm', ItemComponent.getItemStack(EnumComponentType.MOTOR),
|
'm', ItemComponent.getItemStack(EnumComponentType.MOTOR),
|
||||||
'c', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE)));
|
'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
|
||||||
// Force field shapes are 1 Memory crystal, 3 to 5 Coil crystal
|
// Force field shapes are 1 Memory crystal, 3 to 5 Coil crystal
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldShape.getItemStack(EnumForceFieldShape.SPHERE), false, " ", "CmC", "CCC",
|
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
|
// 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 ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.ATTRACTION), false, "CCC", "rir", " m ",
|
||||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||||
'r', Blocks.redstone_block,
|
'r', "blockRedstone",
|
||||||
'i', Blocks.iron_block,
|
'i', Blocks.iron_block,
|
||||||
'm', itemStackMotorMV));
|
'm', itemStackMotorMV));
|
||||||
// Force field breaking upgrade is 3 Coil crystal, 1 Diamond axe, 1 diamond shovel, 1 diamond pick
|
// 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", " ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.RANGE), false, "CCC", "RMR", " ",
|
||||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||||
'M', ItemComponent.getItemStack(EnumComponentType.MEMORY_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
|
// 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",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.REPULSION), false, " m ", "rir", "CCC",
|
||||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||||
'r', Blocks.redstone_block,
|
'r', "blockRedstone",
|
||||||
'i', Blocks.iron_block,
|
'i', Blocks.iron_block,
|
||||||
'm', itemStackMotorMV));
|
'm', itemStackMotorMV));
|
||||||
// Force field rotation upgrade is 3 Coil crystal, 2 MV Motors, 1 Computer interface
|
// 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", " ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.STABILIZATION), "CCC", "lMl", " ",
|
||||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||||
'M', ItemComponent.getItemStack(EnumComponentType.MEMORY_CRYSTAL),
|
'M', ItemComponent.getItemStack(EnumComponentType.MEMORY_CRYSTAL),
|
||||||
'l', Blocks.lapis_block));
|
'l', "blockLapis"));
|
||||||
// Force field thickness upgrade is 8 Coil crystal, 1 Diamond crystal
|
// Force field thickness upgrade is 8 Coil crystal, 1 Diamond crystal
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.THICKNESS), false, "CCC", "CpC", " ",
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemForceFieldUpgrade.getItemStack(EnumForceFieldUpgrade.THICKNESS), false, "CCC", "CpC", " ",
|
||||||
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
'C', ItemComponent.getItemStack(EnumComponentType.COIL_CRYSTAL),
|
||||||
|
@ -1076,8 +1085,8 @@ public class Recipes {
|
||||||
// TODO: add fluid transposer/canning support
|
// TODO: add fluid transposer/canning support
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockLaserMedium), false, "lrl", "rmr", "lrl",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockLaserMedium), false, "lrl", "rmr", "lrl",
|
||||||
'm', ItemComponent.getItemStack(EnumComponentType.LASER_MEDIUM_EMPTY),
|
'm', ItemComponent.getItemStack(EnumComponentType.LASER_MEDIUM_EMPTY),
|
||||||
'r', Blocks.redstone_block,
|
'r', "blockRedstone",
|
||||||
'l', Blocks.lapis_block));
|
'l', "blockLapis"));
|
||||||
|
|
||||||
// Laser lift is ...
|
// Laser lift is ...
|
||||||
Object oreMagnetizer = itemStackMachineCasings[0];
|
Object oreMagnetizer = itemStackMachineCasings[0];
|
||||||
|
@ -1297,12 +1306,35 @@ public class Recipes {
|
||||||
'g', "paneGlassColorless",
|
'g', "paneGlassColorless",
|
||||||
'h', "blockHull2_plain"));
|
'h', "blockHull2_plain"));
|
||||||
|
|
||||||
// Anuic Energy bank is 1 capacitive crystal + 1 MV Machine casing + 3 Power interfaces
|
// Basic Energy bank is 1 Capacitive crystal + 1 Power interface + 3 paper + 4 iron bars
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank), false, "pip", "pcp", "pmp",
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockEnergyBank, 1, 1), false, "iPi", "pcp", "ipi",
|
||||||
'c', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
'c', ItemComponent.getItemStack(EnumComponentType.CAPACITIVE_CRYSTAL),
|
||||||
'm', itemStackMachineCasings[1],
|
'i', ironBars,
|
||||||
'i', ItemComponent.getItemStack(EnumComponentType.COMPUTER_INTERFACE),
|
'p', Items.paper,
|
||||||
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE)));
|
'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
|
// 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++) {
|
for (int tier = 1; tier <= 3; tier++) {
|
||||||
|
|
|
@ -278,7 +278,9 @@ public class WarpDriveConfig {
|
||||||
public static int ENAN_REACTOR_MAX_LASERS_PER_SECOND = 6;
|
public static int ENAN_REACTOR_MAX_LASERS_PER_SECOND = 6;
|
||||||
|
|
||||||
// Power store
|
// 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
|
// Laser lift
|
||||||
public static int LIFT_MAX_ENERGY_STORED = 900;
|
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());
|
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
|
||||||
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
|
||||||
LIFT_MAX_ENERGY_STORED = clamp(1, Integer.MAX_VALUE,
|
LIFT_MAX_ENERGY_STORED = clamp(1, Integer.MAX_VALUE,
|
||||||
|
|
|
@ -22,7 +22,8 @@ public enum EnumComponentType {
|
||||||
ACTIVATED_CARBON ("ActivatedCarbon"),
|
ACTIVATED_CARBON ("ActivatedCarbon"),
|
||||||
LASER_MEDIUM_EMPTY ("LaserMediumEmpty"),
|
LASER_MEDIUM_EMPTY ("LaserMediumEmpty"),
|
||||||
COIL_CRYSTAL ("CoilCrystal"),
|
COIL_CRYSTAL ("CoilCrystal"),
|
||||||
ELECTROMAGNETIC_PROJECTOR ("ElectromagneticProjector");
|
ELECTROMAGNETIC_PROJECTOR ("ElectromagneticProjector"),
|
||||||
|
SUPERCONDUCTOR ("Superconductor");
|
||||||
|
|
||||||
public final String unlocalizedName;
|
public final String unlocalizedName;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue