Added computercube and lapotronic energy orb
This commit is contained in:
parent
2a754b2497
commit
2f59ca1b84
8 changed files with 198 additions and 24 deletions
47
src/main/java/techreborn/blocks/BlockComputerCube.java
Normal file
47
src/main/java/techreborn/blocks/BlockComputerCube.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockComputerCube extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockComputerCube(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.computercube");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -381,13 +381,6 @@ public class RecipesIC2 {
|
|||
'H', "plateChrome",
|
||||
'C', "circuitElite",
|
||||
'B', ModBlocks.HighAdvancedMachineBlock});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.quantumTank),
|
||||
new Object[]
|
||||
{"EPE", "PCP", "EPE",
|
||||
'P', "platePlatinum",
|
||||
'E', "circuitMaster",
|
||||
'C', ModBlocks.quantumChest});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.quantumChest),
|
||||
new Object[]
|
||||
|
@ -398,29 +391,50 @@ public class RecipesIC2 {
|
|||
'Q', ModBlocks.digitalChest,
|
||||
'T', IC2Items.getItem("teleporter")});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ComputerCube),
|
||||
new Object[]
|
||||
{"DME", "MAM", "EMD",
|
||||
'E', ItemParts.getPartByName("energyFlowCircuit"),
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'M', ItemParts.getPartByName("computerMonitor"),
|
||||
'A', IC2Items.getItem("advancedMachine")
|
||||
});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.lapotronicOrb),
|
||||
new Object[]
|
||||
{"LLL", "LPL", "LLL",
|
||||
'L', IC2Items.getItem("lapotronCrystal"),
|
||||
'P', IC2Items.getItem("iridiumPlate")
|
||||
});
|
||||
|
||||
LogHelper.info("Added Expensive IC2 Recipes");
|
||||
}
|
||||
|
||||
public static void addShapedTrRecipes()
|
||||
{
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.quantumTank),
|
||||
new Object[]
|
||||
{"EPE", "PCP", "EPE",
|
||||
'P', "platePlatinum",
|
||||
'E', "circuitMaster",
|
||||
'C', ModBlocks.quantumChest});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.digitalChest),
|
||||
new Object[]
|
||||
{"PPP", "PDP", "PCP",
|
||||
'P', "plateAluminum",
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'C', ItemParts.getPartByName("computerMonitor")
|
||||
});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.digitalChest),
|
||||
new Object[]
|
||||
{"PPP", "PDP", "PCP",
|
||||
'P', "plateSteel",
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'C', ItemParts.getPartByName("computerMonitor")
|
||||
}
|
||||
);
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.digitalChest),
|
||||
new Object[]
|
||||
{"PPP", "PDP", "PCP",
|
||||
'P', "plateAluminum",
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'C', ItemParts.getPartByName("computerMonitor")
|
||||
}
|
||||
);
|
||||
|
||||
LogHelper.info("Added Expensive IC2 Recipes");
|
||||
}
|
||||
|
||||
public static void addShapedTrRecipes()
|
||||
{
|
||||
});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts, 1, 40),
|
||||
new Object[]
|
||||
{ "PLP", "RGB", "PYP",
|
||||
|
|
|
@ -70,6 +70,7 @@ public class ConfigTechReborn {
|
|||
public static int AdvancedDrillCharge;
|
||||
public static int LapotronPackCharge;
|
||||
public static int LithiumBatpackCharge;
|
||||
public static int LapotronicOrbMaxCharge;
|
||||
public static int OmniToolCharge;
|
||||
public static int RockCutterCharge;
|
||||
public static int GravityCharge;
|
||||
|
@ -78,6 +79,7 @@ public class ConfigTechReborn {
|
|||
// Tier
|
||||
public static int AdvancedDrillTier;
|
||||
public static int LapotronPackTier;
|
||||
public static int LapotronicOrbTier;
|
||||
public static int LithiumBatpackTier;
|
||||
public static int OmniToolTier;
|
||||
public static int RockCutterTier;
|
||||
|
@ -490,6 +492,14 @@ public class ConfigTechReborn {
|
|||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronPackMaxCharge.tooltop"))
|
||||
.getInt();
|
||||
LapotronicOrbMaxCharge = config
|
||||
.get(CATEGORY_POWER,
|
||||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronicOrbMaxCharge"),
|
||||
10000000,
|
||||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronicOrbMaxCharge"))
|
||||
.getInt();
|
||||
LithiumBatpackCharge = config
|
||||
.get(CATEGORY_POWER,
|
||||
StatCollector
|
||||
|
@ -556,6 +566,14 @@ public class ConfigTechReborn {
|
|||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronPackTier.tooltip"))
|
||||
.getInt();
|
||||
LapotronicOrbTier = config
|
||||
.get(CATEGORY_POWER,
|
||||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronicOrbTier"),
|
||||
2,
|
||||
StatCollector
|
||||
.translateToLocal("config.techreborn.lapotronicOrbTier.tooltip"))
|
||||
.getInt();
|
||||
LithiumBatpackTier = config
|
||||
.get(CATEGORY_POWER,
|
||||
StatCollector
|
||||
|
|
|
@ -106,6 +106,7 @@ public class ModBlocks {
|
|||
public static Block VacuumFreezer;
|
||||
public static Block PlasmaGenerator;
|
||||
public static Block FusionControlComputer;
|
||||
public static Block ComputerCube;
|
||||
public static Block FusionCoil;
|
||||
public static Block LightningRod;
|
||||
public static Block heatGenerator;
|
||||
|
@ -261,6 +262,9 @@ public class ModBlocks {
|
|||
PlasmaGenerator = new BlockPlasmaGenerator(Material.rock);
|
||||
GameRegistry.registerBlock(PlasmaGenerator, "plasmagenerator");
|
||||
|
||||
ComputerCube = new BlockComputerCube(Material.rock);
|
||||
GameRegistry.registerBlock(ComputerCube, "computercube");
|
||||
|
||||
FusionControlComputer = new BlockFusionControlComputer(Material.rock);
|
||||
GameRegistry.registerBlock(FusionControlComputer, "fusioncontrolcomputer");
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import techreborn.items.ItemPlates;
|
|||
import techreborn.items.ItemPurifiedCrushedOre;
|
||||
import techreborn.items.ItemRods;
|
||||
import techreborn.items.ItemUUmatter;
|
||||
import techreborn.items.ItemLapotronicOrb;
|
||||
import techreborn.items.armor.ItemGravityChest;
|
||||
import techreborn.items.armor.ItemLapotronPack;
|
||||
import techreborn.items.armor.ItemLithiumBatpack;
|
||||
|
@ -51,6 +52,7 @@ public class ModItems {
|
|||
public static Item gravityChest;
|
||||
public static Item omniTool;
|
||||
public static Item advancedDrill;
|
||||
public static Item lapotronicOrb;
|
||||
public static Item manuel;
|
||||
public static Item uuMatter;
|
||||
public static Item plate;
|
||||
|
@ -119,6 +121,8 @@ public class ModItems {
|
|||
GameRegistry.registerItem(lithiumBatpack, "lithiumBatpack");
|
||||
lapotronpack = new ItemLapotronPack(ArmorMaterial.DIAMOND, 7, 1);
|
||||
GameRegistry.registerItem(lapotronpack, "lapotronPack");
|
||||
lapotronicOrb = new ItemLapotronicOrb();
|
||||
GameRegistry.registerItem(lapotronicOrb, "lapotronicOrb");
|
||||
omniTool = new ItemOmniTool(ToolMaterial.EMERALD);
|
||||
GameRegistry.registerItem(omniTool, "omniTool");
|
||||
advancedDrill = new ItemAdvancedDrill();
|
||||
|
|
85
src/main/java/techreborn/items/ItemLapotronicOrb.java
Normal file
85
src/main/java/techreborn/items/ItemLapotronicOrb.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
package techreborn.items;
|
||||
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemLapotronicOrb extends Item implements IElectricItem {
|
||||
|
||||
public static final int maxCharge = ConfigTechReborn.LapotronicOrbMaxCharge;
|
||||
public static final int tier = ConfigTechReborn.LithiumBatpackTier;
|
||||
public double transferLimit = 10000;
|
||||
|
||||
public ItemLapotronicOrb(){
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(13);
|
||||
setUnlocalizedName("techreborn.lapotronicorb");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister){
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "lapotronicEnergyOrb");
|
||||
}
|
||||
|
||||
@SuppressWarnings(
|
||||
{ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList){
|
||||
ItemStack itemStack = new ItemStack(this, 1);
|
||||
if (getChargedItem(itemStack) == this){
|
||||
ItemStack charged = new ItemStack(this, 1);
|
||||
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true,
|
||||
false);
|
||||
itemList.add(charged);
|
||||
}
|
||||
if (getEmptyItem(itemStack) == this){
|
||||
itemList.add(new ItemStack(this, 1, getMaxDamage()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ItemStack itemStack){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getChargedItem(ItemStack itemStack){
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getEmptyItem(ItemStack itemStack){
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxCharge(ItemStack itemStack){
|
||||
return maxCharge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTier(ItemStack itemStack){
|
||||
return tier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getTransferLimit(ItemStack itemStack){
|
||||
return transferLimit;
|
||||
}
|
||||
|
||||
}
|
|
@ -42,6 +42,7 @@ tile.techreborn.electriccraftingtable.name=Electric Autocrafting Table
|
|||
tile.techreborn.vacuumfreezer.name=Vacuum Freezer
|
||||
tile.techreborn.plasmagenerator.name=Plasma Generator
|
||||
tile.techreborn.fusioncontrolcomputer.name=Fusion Control Computer
|
||||
tile.techreborn.computercube.name=TechReborn Computer Cube
|
||||
tile.techreborn.fusioncoil.name=Fusion Coil
|
||||
tile.techreborn.lightningrod.name=Lightning Rod
|
||||
tile.techreborn.assemblinmachine.name=Assembling Machine
|
||||
|
@ -646,6 +647,7 @@ item.techreborn.lithiumbatpack.name=Lithium Batpack
|
|||
item.techreborn.lapotronpack.name=Lapotron Pack
|
||||
item.techreborn.omniTool.name=Omni tool
|
||||
item.techreborn.advancedDrill.name=Advanced Drill
|
||||
item.techreborn.lapotronicorb.name=Lapotronic Energy Orb
|
||||
|
||||
#Buckets
|
||||
item.bucketberylium.name=Berylium Bucket
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
Add table
Reference in a new issue