add recipes for most stuff
This commit is contained in:
@@ -7,6 +7,7 @@ import storagecraft.block.BlockDrive;
|
||||
import storagecraft.block.BlockExporter;
|
||||
import storagecraft.block.BlockGrid;
|
||||
import storagecraft.block.BlockImporter;
|
||||
import storagecraft.block.BlockMachineCasing;
|
||||
import storagecraft.block.BlockStorageProxy;
|
||||
|
||||
public class StorageCraftBlocks
|
||||
@@ -19,4 +20,5 @@ public class StorageCraftBlocks
|
||||
public static final BlockImporter IMPORTER = new BlockImporter();
|
||||
public static final BlockExporter EXPORTER = new BlockExporter();
|
||||
public static final BlockDetector DETECTOR = new BlockDetector();
|
||||
public static final BlockMachineCasing MACHINE_CASING = new BlockMachineCasing();
|
||||
}
|
||||
|
@@ -1,10 +1,14 @@
|
||||
package storagecraft;
|
||||
|
||||
import storagecraft.item.ItemCore;
|
||||
import storagecraft.item.ItemStorageCell;
|
||||
import storagecraft.item.ItemStorigiumIngot;
|
||||
import storagecraft.item.ItemWirelessGrid;
|
||||
|
||||
public class StorageCraftItems
|
||||
{
|
||||
public static final ItemStorageCell STORAGE_CELL = new ItemStorageCell();
|
||||
public static final ItemWirelessGrid WIRELESS_GRID = new ItemWirelessGrid();
|
||||
public static final ItemStorigiumIngot STORIGIUM_INGOT = new ItemStorigiumIngot();
|
||||
public static final ItemCore CORE = new ItemCore();
|
||||
}
|
||||
|
33
src/main/java/storagecraft/block/BlockMachineCasing.java
Normal file
33
src/main/java/storagecraft/block/BlockMachineCasing.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package storagecraft.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockMachineCasing extends BlockBase
|
||||
{
|
||||
private IIcon icon;
|
||||
|
||||
public BlockMachineCasing()
|
||||
{
|
||||
super("machineCasing");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
icon = register.registerIcon("storagecraft:generic");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
}
|
55
src/main/java/storagecraft/item/ItemCore.java
Normal file
55
src/main/java/storagecraft/item/ItemCore.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package storagecraft.item;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemCore extends ItemBase
|
||||
{
|
||||
public static final int TYPE_CONSTRUCTION = 0;
|
||||
public static final int TYPE_DESTRUCTION = 1;
|
||||
|
||||
private IIcon constructionIcon;
|
||||
private IIcon destructionIcon;
|
||||
|
||||
public ItemCore()
|
||||
{
|
||||
super("core");
|
||||
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register)
|
||||
{
|
||||
constructionIcon = register.registerIcon("storagecraft:core0");
|
||||
destructionIcon = register.registerIcon("storagecraft:core1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage)
|
||||
{
|
||||
switch (damage)
|
||||
{
|
||||
case TYPE_CONSTRUCTION:
|
||||
return constructionIcon;
|
||||
case TYPE_DESTRUCTION:
|
||||
return destructionIcon;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
9
src/main/java/storagecraft/item/ItemStorigiumIngot.java
Normal file
9
src/main/java/storagecraft/item/ItemStorigiumIngot.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package storagecraft.item;
|
||||
|
||||
public class ItemStorigiumIngot extends ItemBase
|
||||
{
|
||||
public ItemStorigiumIngot()
|
||||
{
|
||||
super("storigiumIngot");
|
||||
}
|
||||
}
|
@@ -6,12 +6,16 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.StorageCraftBlocks;
|
||||
import storagecraft.StorageCraftItems;
|
||||
import storagecraft.gui.GuiHandler;
|
||||
import storagecraft.item.ItemBlockCable;
|
||||
import storagecraft.item.ItemBlockGrid;
|
||||
import storagecraft.item.ItemCore;
|
||||
import storagecraft.network.MessageCompareUpdate;
|
||||
import storagecraft.network.MessageDetectorAmountUpdate;
|
||||
import storagecraft.network.MessageDetectorModeUpdate;
|
||||
@@ -65,9 +69,124 @@ public class CommonProxy
|
||||
GameRegistry.registerBlock(StorageCraftBlocks.IMPORTER, "importer");
|
||||
GameRegistry.registerBlock(StorageCraftBlocks.EXPORTER, "exporter");
|
||||
GameRegistry.registerBlock(StorageCraftBlocks.DETECTOR, "detector");
|
||||
GameRegistry.registerBlock(StorageCraftBlocks.MACHINE_CASING, "machineCasing");
|
||||
|
||||
GameRegistry.registerItem(StorageCraftItems.STORAGE_CELL, "storageCell");
|
||||
GameRegistry.registerItem(StorageCraftItems.WIRELESS_GRID, "wirelessGrid");
|
||||
GameRegistry.registerItem(StorageCraftItems.STORIGIUM_INGOT, "storigiumIngot");
|
||||
GameRegistry.registerItem(StorageCraftItems.CORE, "core");
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORIGIUM_INGOT, 4),
|
||||
"II",
|
||||
"IQ",
|
||||
'I', new ItemStack(Items.iron_ingot),
|
||||
'Q', new ItemStack(Items.quartz)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.MACHINE_CASING),
|
||||
"SSS",
|
||||
"S S",
|
||||
"SSS",
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
|
||||
new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.glowstone_dust)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
|
||||
new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.glowstone_dust)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.CONTROLLER),
|
||||
"SDS",
|
||||
"DRD",
|
||||
"SDS",
|
||||
'D', new ItemStack(Items.diamond),
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
'R', new ItemStack(Blocks.redstone_block)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftBlocks.DRIVE),
|
||||
new ItemStack(StorageCraftBlocks.MACHINE_CASING),
|
||||
new ItemStack(Blocks.chest)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.CABLE, 6, 0),
|
||||
"SSS",
|
||||
"GGG",
|
||||
"SSS",
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
'G', new ItemStack(Blocks.glass)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftBlocks.CABLE, 1, 1),
|
||||
new ItemStack(StorageCraftBlocks.CABLE, 1, 0),
|
||||
new ItemStack(Items.redstone)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.GRID, 1, 0),
|
||||
"SCS",
|
||||
"GMG",
|
||||
"SDS",
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
'G', new ItemStack(Blocks.glass),
|
||||
'C', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
|
||||
'D', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
|
||||
'M', new ItemStack(StorageCraftBlocks.MACHINE_CASING)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftBlocks.GRID, 1, 1),
|
||||
new ItemStack(StorageCraftBlocks.GRID, 1, 0),
|
||||
new ItemStack(Blocks.crafting_table)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.WIRELESS_GRID),
|
||||
"PCP",
|
||||
"PGP",
|
||||
"PDP",
|
||||
'P', new ItemStack(Items.ender_pearl),
|
||||
'C', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
|
||||
'D', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
|
||||
'G', new ItemStack(Blocks.glass)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.STORAGE_PROXY),
|
||||
"SCS",
|
||||
"HMH",
|
||||
"SDS",
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
'H', new ItemStack(Blocks.chest),
|
||||
'C', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
|
||||
'D', new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
|
||||
'M', new ItemStack(StorageCraftBlocks.MACHINE_CASING)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftBlocks.IMPORTER),
|
||||
new ItemStack(StorageCraftBlocks.MACHINE_CASING),
|
||||
new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(StorageCraftBlocks.EXPORTER),
|
||||
new ItemStack(StorageCraftBlocks.MACHINE_CASING),
|
||||
new ItemStack(StorageCraftItems.CORE, 1, ItemCore.TYPE_DESTRUCTION)
|
||||
);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(StorageCraftBlocks.DETECTOR),
|
||||
"SCS",
|
||||
"RMR",
|
||||
"SRS",
|
||||
'S', new ItemStack(StorageCraftItems.STORIGIUM_INGOT),
|
||||
'R', new ItemStack(Items.redstone),
|
||||
'C', new ItemStack(Items.comparator),
|
||||
'M', new ItemStack(StorageCraftBlocks.MACHINE_CASING)
|
||||
);
|
||||
|
||||
// @TODO: Recipe for storage cells
|
||||
}
|
||||
|
||||
public void init(FMLInitializationEvent e)
|
||||
|
@@ -59,6 +59,7 @@ block.storagecraft:storageProxy.name=Storage Proxy
|
||||
block.storagecraft:importer.name=Importer
|
||||
block.storagecraft:exporter.name=Exporter
|
||||
block.storagecraft:detector.name=Detector
|
||||
block.storagecraft:machineCasing.name=Machine Casing
|
||||
|
||||
item.storagecraft:storageCell.0.name=1k Storage Cell
|
||||
item.storagecraft:storageCell.1.name=4k Storage Cell
|
||||
@@ -66,3 +67,6 @@ item.storagecraft:storageCell.2.name=16k Storage Cell
|
||||
item.storagecraft:storageCell.3.name=64k Storage Cell
|
||||
item.storagecraft:storageCell.4.name=Creative Storage Cell
|
||||
item.storagecraft:wirelessGrid.name=Wireless Grid
|
||||
item.storagecraft:storigiumIngot.name=Storigium Ingot
|
||||
item.storagecraft:core.0.name=Construction Core
|
||||
item.storagecraft:core.1.name=Destruction Core
|
BIN
src/main/resources/assets/storagecraft/textures/items/core0.png
Normal file
BIN
src/main/resources/assets/storagecraft/textures/items/core0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 B |
BIN
src/main/resources/assets/storagecraft/textures/items/core1.png
Normal file
BIN
src/main/resources/assets/storagecraft/textures/items/core1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 261 B |
Binary file not shown.
After Width: | Height: | Size: 275 B |
Reference in New Issue
Block a user