Began work on Quantum Entangler
Also started work on base code for Item and cleaned up core class. Expect Quantum Entangler to be finished overnight, code-wise!
This commit is contained in:
parent
18a7cbb7b2
commit
32044d27ae
4 changed files with 59 additions and 7 deletions
|
@ -2,4 +2,6 @@
|
|||
|
||||
itemGroup.resonantinduction=Resonant Induction
|
||||
|
||||
tile.resonantinduction\:tesla.name=Tesla Coil
|
||||
tile.resonantinduction\:tesla.name=Tesla Coil
|
||||
|
||||
item.resonantinduction\:entangler.name=Quantum Entangler
|
|
@ -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);
|
||||
|
|
21
src/resonantinduction/base/ItemBase.java
Normal file
21
src/resonantinduction/base/ItemBase.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
17
src/resonantinduction/entangler/ItemQuantumEntangler.java
Normal file
17
src/resonantinduction/entangler/ItemQuantumEntangler.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue