recipes for storage parts
This commit is contained in:
@@ -5,6 +5,7 @@ import storagecraft.item.ItemProcessor;
|
|||||||
import storagecraft.item.ItemSilicon;
|
import storagecraft.item.ItemSilicon;
|
||||||
import storagecraft.item.ItemStorageCell;
|
import storagecraft.item.ItemStorageCell;
|
||||||
import storagecraft.item.ItemQuartzEnrichedIron;
|
import storagecraft.item.ItemQuartzEnrichedIron;
|
||||||
|
import storagecraft.item.ItemStoragePart;
|
||||||
import storagecraft.item.ItemWirelessGrid;
|
import storagecraft.item.ItemWirelessGrid;
|
||||||
|
|
||||||
public class StorageCraftItems
|
public class StorageCraftItems
|
||||||
@@ -15,4 +16,5 @@ public class StorageCraftItems
|
|||||||
public static final ItemCore CORE = new ItemCore();
|
public static final ItemCore CORE = new ItemCore();
|
||||||
public static final ItemSilicon SILICON = new ItemSilicon();
|
public static final ItemSilicon SILICON = new ItemSilicon();
|
||||||
public static final ItemProcessor PROCESSOR = new ItemProcessor();
|
public static final ItemProcessor PROCESSOR = new ItemProcessor();
|
||||||
|
public static final ItemStoragePart STORAGE_PART = new ItemStoragePart();
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,12 @@ import storagecraft.storage.CellStorage;
|
|||||||
|
|
||||||
public class ItemStorageCell extends ItemBase
|
public class ItemStorageCell extends ItemBase
|
||||||
{
|
{
|
||||||
|
public static final int TYPE_1K = 0;
|
||||||
|
public static final int TYPE_4K = 1;
|
||||||
|
public static final int TYPE_16K = 2;
|
||||||
|
public static final int TYPE_64K = 3;
|
||||||
|
public static final int TYPE_CREATIVE = 4;
|
||||||
|
|
||||||
private IIcon[] icons = new IIcon[5];
|
private IIcon[] icons = new IIcon[5];
|
||||||
|
|
||||||
public ItemStorageCell()
|
public ItemStorageCell()
|
||||||
@@ -89,15 +95,15 @@ public class ItemStorageCell extends ItemBase
|
|||||||
{
|
{
|
||||||
switch (cell.getItemDamage())
|
switch (cell.getItemDamage())
|
||||||
{
|
{
|
||||||
case 0:
|
case TYPE_1K:
|
||||||
return 1000;
|
return 1000;
|
||||||
case 1:
|
case TYPE_4K:
|
||||||
return 4000;
|
return 4000;
|
||||||
case 2:
|
case TYPE_16K:
|
||||||
return 16000;
|
return 16000;
|
||||||
case 3:
|
case TYPE_64K:
|
||||||
return 64000;
|
return 64000;
|
||||||
case 4:
|
case TYPE_CREATIVE:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
50
src/main/java/storagecraft/item/ItemStoragePart.java
Normal file
50
src/main/java/storagecraft/item/ItemStoragePart.java
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
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 ItemStoragePart extends ItemBase
|
||||||
|
{
|
||||||
|
public static final int TYPE_1K = 0;
|
||||||
|
public static final int TYPE_4K = 1;
|
||||||
|
public static final int TYPE_16K = 2;
|
||||||
|
public static final int TYPE_64K = 3;
|
||||||
|
|
||||||
|
private IIcon[] icons = new IIcon[4];
|
||||||
|
|
||||||
|
public ItemStoragePart()
|
||||||
|
{
|
||||||
|
super("storagePart");
|
||||||
|
|
||||||
|
setHasSubtypes(true);
|
||||||
|
setMaxDamage(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSubItems(Item item, CreativeTabs tab, List list)
|
||||||
|
{
|
||||||
|
for (int i = 0; i <= 3; ++i)
|
||||||
|
{
|
||||||
|
list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerIcons(IIconRegister register)
|
||||||
|
{
|
||||||
|
for (int i = 0; i <= 3; ++i)
|
||||||
|
{
|
||||||
|
icons[i] = register.registerIcon("storagecraft:storagePart" + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIconFromDamage(int damage)
|
||||||
|
{
|
||||||
|
return icons[damage];
|
||||||
|
}
|
||||||
|
}
|
@@ -17,6 +17,8 @@ import storagecraft.item.ItemBlockCable;
|
|||||||
import storagecraft.item.ItemBlockGrid;
|
import storagecraft.item.ItemBlockGrid;
|
||||||
import storagecraft.item.ItemCore;
|
import storagecraft.item.ItemCore;
|
||||||
import storagecraft.item.ItemProcessor;
|
import storagecraft.item.ItemProcessor;
|
||||||
|
import storagecraft.item.ItemStorageCell;
|
||||||
|
import storagecraft.item.ItemStoragePart;
|
||||||
import storagecraft.network.MessageCompareUpdate;
|
import storagecraft.network.MessageCompareUpdate;
|
||||||
import storagecraft.network.MessageDetectorAmountUpdate;
|
import storagecraft.network.MessageDetectorAmountUpdate;
|
||||||
import storagecraft.network.MessageDetectorModeUpdate;
|
import storagecraft.network.MessageDetectorModeUpdate;
|
||||||
@@ -86,6 +88,7 @@ public class CommonProxy
|
|||||||
GameRegistry.registerItem(StorageCraftItems.CORE, "core");
|
GameRegistry.registerItem(StorageCraftItems.CORE, "core");
|
||||||
GameRegistry.registerItem(StorageCraftItems.SILICON, "silicon");
|
GameRegistry.registerItem(StorageCraftItems.SILICON, "silicon");
|
||||||
GameRegistry.registerItem(StorageCraftItems.PROCESSOR, "processor");
|
GameRegistry.registerItem(StorageCraftItems.PROCESSOR, "processor");
|
||||||
|
GameRegistry.registerItem(StorageCraftItems.STORAGE_PART, "storagePart");
|
||||||
|
|
||||||
// Processors
|
// Processors
|
||||||
SoldererRegistry.addRecipe(new SoldererRecipePrintedProcessor(ItemProcessor.TYPE_PRINTED_BASIC));
|
SoldererRegistry.addRecipe(new SoldererRecipePrintedProcessor(ItemProcessor.TYPE_PRINTED_BASIC));
|
||||||
@@ -234,7 +237,87 @@ public class CommonProxy
|
|||||||
'P', new ItemStack(StorageCraftItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
|
'P', new ItemStack(StorageCraftItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED)
|
||||||
);
|
);
|
||||||
|
|
||||||
// @TODO: Recipe for storage cells
|
// Storage Cell Parts
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_1K),
|
||||||
|
"EPE",
|
||||||
|
"SRS",
|
||||||
|
"ESE",
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON),
|
||||||
|
'P', new ItemStack(StorageCraftItems.SILICON),
|
||||||
|
'S', new ItemStack(Blocks.glass)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K),
|
||||||
|
"EPE",
|
||||||
|
"SRS",
|
||||||
|
"ESE",
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON),
|
||||||
|
'P', new ItemStack(StorageCraftItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC),
|
||||||
|
'S', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_1K)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_16K),
|
||||||
|
"EPE",
|
||||||
|
"SRS",
|
||||||
|
"ESE",
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON),
|
||||||
|
'P', new ItemStack(StorageCraftItems.PROCESSOR, 1, ItemProcessor.TYPE_IMPROVED),
|
||||||
|
'S', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_64K),
|
||||||
|
"EPE",
|
||||||
|
"SRS",
|
||||||
|
"ESE",
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON),
|
||||||
|
'P', new ItemStack(StorageCraftItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
|
||||||
|
'S', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_16K)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Storage Cells
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_CELL, 1, ItemStorageCell.TYPE_1K),
|
||||||
|
"GRG",
|
||||||
|
"RPR",
|
||||||
|
"EEE",
|
||||||
|
'G', new ItemStack(Blocks.glass),
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'P', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_1K),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_CELL, 1, ItemStorageCell.TYPE_4K),
|
||||||
|
"GRG",
|
||||||
|
"RPR",
|
||||||
|
"EEE",
|
||||||
|
'G', new ItemStack(Blocks.glass),
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'P', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_4K),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_CELL, 1, ItemStorageCell.TYPE_16K),
|
||||||
|
"GRG",
|
||||||
|
"RPR",
|
||||||
|
"EEE",
|
||||||
|
'G', new ItemStack(Blocks.glass),
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'P', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_16K),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON)
|
||||||
|
);
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(new ItemStack(StorageCraftItems.STORAGE_CELL, 1, ItemStorageCell.TYPE_64K),
|
||||||
|
"GRG",
|
||||||
|
"RPR",
|
||||||
|
"EEE",
|
||||||
|
'G', new ItemStack(Blocks.glass),
|
||||||
|
'R', new ItemStack(Items.redstone),
|
||||||
|
'P', new ItemStack(StorageCraftItems.STORAGE_PART, 1, ItemStoragePart.TYPE_64K),
|
||||||
|
'E', new ItemStack(StorageCraftItems.QUARTZ_ENRICHED_IRON)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(FMLInitializationEvent e)
|
public void init(FMLInitializationEvent e)
|
||||||
|
@@ -79,4 +79,8 @@ item.storagecraft:processor.2.name=Printed Advanced Processor
|
|||||||
item.storagecraft:processor.3.name=Basic Processor
|
item.storagecraft:processor.3.name=Basic Processor
|
||||||
item.storagecraft:processor.4.name=Improved Processor
|
item.storagecraft:processor.4.name=Improved Processor
|
||||||
item.storagecraft:processor.5.name=Advanced Processor
|
item.storagecraft:processor.5.name=Advanced Processor
|
||||||
item.storagecraft:processor.6.name=Printed Silicon
|
item.storagecraft:processor.6.name=Printed Silicon
|
||||||
|
item.storagecraft:storagePart.0.name=1k Storage Part
|
||||||
|
item.storagecraft:storagePart.1.name=4k Storage Part
|
||||||
|
item.storagecraft:storagePart.2.name=16k Storage Part
|
||||||
|
item.storagecraft:storagePart.3.name=64k Storage Part
|
Binary file not shown.
After Width: | Height: | Size: 268 B |
Binary file not shown.
After Width: | Height: | Size: 266 B |
Binary file not shown.
After Width: | Height: | Size: 269 B |
Binary file not shown.
After Width: | Height: | Size: 267 B |
Reference in New Issue
Block a user