diff --git a/resources/assets/resonantinduction/languages/en_US.properties b/resources/assets/resonantinduction/languages/en_US.properties index e8315a57..2eb25067 100755 --- a/resources/assets/resonantinduction/languages/en_US.properties +++ b/resources/assets/resonantinduction/languages/en_US.properties @@ -2,4 +2,6 @@ itemGroup.resonantinduction=Resonant Induction -tile.resonantinduction\:tesla.name=Tesla Coil \ No newline at end of file +tile.resonantinduction\:tesla.name=Tesla Coil + +item.resonantinduction\:entangler.name=Quantum Entangler \ No newline at end of file diff --git a/src/resonantinduction/ResonantInduction.java b/src/resonantinduction/ResonantInduction.java index 03f40c9f..09b6b28b 100644 --- a/src/resonantinduction/ResonantInduction.java +++ b/src/resonantinduction/ResonantInduction.java @@ -9,6 +9,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; import net.minecraftforge.oredict.ShapedOreRecipe; +import resonantinduction.entangler.ItemQuantumEntangler; import resonantinduction.tesla.BlockTesla; import resonantinduction.tesla.TileEntityTesla; import cpw.mods.fml.common.FMLLog; @@ -38,7 +39,7 @@ public class ResonantInduction */ public static final String ID = "resonantinduction"; public static final String NAME = "Resonant Induction"; - public static final String CHANNEL = "resonantinduc"; + public static final String CHANNEL = "R_INDUC"; public static final String MAJOR_VERSION = "@MAJOR@"; public static final String MINOR_VERSION = "@MINOR@"; @@ -95,10 +96,11 @@ public class ResonantInduction { return NEXT_ITEM_ID++; } + + //Items + public static Item itemQuantumEntangler; - /** - * Blocks and Items - */ + //Blocks public static Block blockTesla; @EventHandler @@ -107,13 +109,23 @@ public class ResonantInduction LOGGER.setParent(FMLLog.getLogger()); CONFIGURATION.load(); + + //config POWER_PER_COAL = (float) CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Coal Wattage", POWER_PER_COAL).getDouble(POWER_PER_COAL); + //items + itemQuantumEntangler = new ItemQuantumEntangler(getNextItemID()); + GameRegistry.registerItem(itemQuantumEntangler, itemQuantumEntangler.getUnlocalizedName()); + + //blocks blockTesla = new BlockTesla(getNextBlockID()); - CONFIGURATION.save(); - GameRegistry.registerBlock(blockTesla, blockTesla.getUnlocalizedName()); + + CONFIGURATION.save(); + + //tiles GameRegistry.registerTileEntity(TileEntityTesla.class, blockTesla.getUnlocalizedName()); + ResonantInduction.proxy.registerRenderers(); TabRI.ITEMSTACK = new ItemStack(blockTesla); diff --git a/src/resonantinduction/base/ItemBase.java b/src/resonantinduction/base/ItemBase.java new file mode 100644 index 00000000..9bd69d36 --- /dev/null +++ b/src/resonantinduction/base/ItemBase.java @@ -0,0 +1,21 @@ +package resonantinduction.base; + +import net.minecraft.item.Item; +import net.minecraftforge.common.Configuration; +import resonantinduction.ResonantInduction; +import resonantinduction.TabRI; + +/** + * + * @author AidanBrady + * + */ +public class ItemBase extends Item +{ + public ItemBase(String name, int id) + { + super(ResonantInduction.CONFIGURATION.get(Configuration.CATEGORY_ITEM, name, id).getInt(id)); + this.setCreativeTab(TabRI.INSTANCE); + this.setUnlocalizedName(ResonantInduction.PREFIX + name); + } +} diff --git a/src/resonantinduction/entangler/ItemQuantumEntangler.java b/src/resonantinduction/entangler/ItemQuantumEntangler.java new file mode 100644 index 00000000..c5b7838c --- /dev/null +++ b/src/resonantinduction/entangler/ItemQuantumEntangler.java @@ -0,0 +1,17 @@ +package resonantinduction.entangler; + +import resonantinduction.base.ItemBase; + +/** + * + * @author AidanBrady + * + */ +public class ItemQuantumEntangler extends ItemBase +{ + public ItemQuantumEntangler(int id) + { + super("entangler", id); + setMaxStackSize(1); + } +}