added magical orbs. so far the air orb is the only one with functionality.

This commit is contained in:
Roger Schoellgen 2013-06-21 19:26:26 -07:00
commit f3ebfbc7c1
11 changed files with 238 additions and 23 deletions

View file

@ -26,11 +26,13 @@ public class Config
ItemIds.IMBUED_SHARD = config.getItem(Strings.IMBUED_SHARD_NAME, ItemIds.IMBUED_SHARD_DEFAULT).getInt(ItemIds.IMBUED_SHARD_DEFAULT);
ItemIds.STAFF_PARTS = config.getItem(Strings.STAFF_NAME, ItemIds.STAFF_PARTS_DEFAULT).getInt(ItemIds.STAFF_PARTS_DEFAULT);
ItemIds.FIRE_STAFF = config.getItem(Strings.FIRE_STAFF_NAME, ItemIds.FIRE_STAFF_DEFAULT).getInt(ItemIds.FIRE_STAFF_DEFAULT);
ItemIds.WATER_STAFF = config.getItem(Strings.WATER_STAFF_NAME, ItemIds.WATER_STAFF_DEFAULT).getInt(ItemIds.WATER_STAFF_DEFAULT);
ItemIds.EARTH_STAFF = config.getItem(Strings.EARTH_STAFF_NAME, ItemIds.EARTH_STAFF_DEFAULT).getInt(ItemIds.EARTH_STAFF_DEFAULT);
ItemIds.AIR_STAFF = config.getItem(Strings.AIR_STAFF_NAME, ItemIds.AIR_STAFF_DEFAULT).getInt(ItemIds.AIR_STAFF_DEFAULT);
ItemIds.ENERGY_STAFF = config.getItem(Strings.ENERGY_STAFF_NAME, ItemIds.ENERGY_STAFF_DEFAULT).getInt(ItemIds.ENERGY_STAFF_DEFAULT);
ItemIds.STAFF_POWER = config.getItem(Strings.POWER_STAFF_NAME, ItemIds.STAFF_POWER_DEFAULT).getInt(ItemIds.STAFF_POWER_DEFAULT);
ItemIds.BUSH_FRUIT = config.getItem(Strings.BUSH_FRUIT_NAME, ItemIds.BUSH_FRUIT_DEFAULT).getInt(ItemIds.BUSH_FRUIT_DEFAULT);
@ -55,6 +57,12 @@ public class Config
ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS_DEFAULT).getInt(ItemIds.IRIDIUM_LEGGINGS_DEFAULT);
ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS_DEFAULT).getInt(ItemIds.IRIDIUM_BOOTS_DEFAULT);
ItemIds.FIRE_ORB = config.getItem(Strings.FIRE_ORB_NAME, ItemIds.FIRE_ORB_DEFAULT).getInt(ItemIds.FIRE_ORB);
ItemIds.WATER_ORB = config.getItem(Strings.WATER_ORB_NAME, ItemIds.WATER_ORB_DEFAULT).getInt(ItemIds.WATER_ORB);
ItemIds.EARTH_ORB = config.getItem(Strings.EARTH_ORB_NAME, ItemIds.EARTH_ORB_DEFAULT).getInt(ItemIds.EARTH_ORB);
ItemIds.AIR_ORB = config.getItem(Strings.AIR_ORB_NAME, ItemIds.AIR_ORB_DEFAULT).getInt(ItemIds.AIR_ORB);
ItemIds.ENERGY_ORB = config.getItem(Strings.ENERGY_ORB_NAME, ItemIds.ENERGY_ORB_DEFAULT).getInt(ItemIds.ENERGY_ORB);
config.save();
}

View file

@ -17,6 +17,32 @@ import net.minecraftforge.liquids.LiquidStack;
public class ItemHandler$1 {
public static Item staffParts;
public static Item imbuedShard;
public static Item fireStaff;
public static Item waterStaff;
public static Item earthStaff;
public static Item airStaff;
public static Item energyStaff;
public static Item fireStaffPower;
public static Item waterStaffPower;
public static Item earthStaffPower;
public static Item airStaffPower;
public static Item energyStaffPower;
public static Item staffPower;
public static Item fireOrb;
public static Item waterOrb;
public static Item earthOrb;
public static Item airOrb;
public static Item energyOrb;
public static Item bushFruit;
public static Item verditeHelmet;
public static Item verditeChestplate;
public static Item verditeLeggings;
@ -37,25 +63,6 @@ public class ItemHandler$1 {
public static Item iridiumLeggings;
public static Item iridiumBoots;
public static Item staffParts;
public static Item imbuedShard;
public static Item fireStaff;
public static Item waterStaff;
public static Item earthStaff;
public static Item airStaff;
public static Item energyStaff;
public static Item fireStaffPower;
public static Item waterStaffPower;
public static Item earthStaffPower;
public static Item airStaffPower;
public static Item energyStaffPower;
public static Item ItemStaffPower;
public static Item bushFruit;
public static void init(){
@ -69,7 +76,13 @@ public class ItemHandler$1 {
airStaff = new ItemStaffAir(ItemIds.AIR_STAFF).setUnlocalizedName(Strings.AIR_STAFF_NAME);
energyStaff = new ItemStaffEnegy(ItemIds.ENERGY_STAFF).setUnlocalizedName(Strings.ENERGY_STAFF_NAME);
ItemStaffPower = new ItemStaffPower(ItemIds.STAFF_POWER);
staffPower = new ItemStaffPower(ItemIds.STAFF_POWER).setUnlocalizedName(Strings.POWER_STAFF_NAME);
fireOrb = new ItemOrbFire(ItemIds.FIRE_ORB).setUnlocalizedName(Strings.FIRE_ORB_NAME);
waterOrb = new ItemOrbWater(ItemIds.WATER_ORB).setUnlocalizedName(Strings.WATER_ORB_NAME);
earthOrb = new ItemOrbEarth(ItemIds.EARTH_ORB).setUnlocalizedName(Strings.EARTH_ORB_NAME);
airOrb = new ItemOrbAir(ItemIds.AIR_ORB).setUnlocalizedName(Strings.AIR_ORB_NAME);
energyOrb = new ItemOrbEnergy(ItemIds.ENERGY_ORB).setUnlocalizedName(Strings.EARTH_ORB_NAME);
bushFruit = new ItemBushFruit(ItemIds.BUSH_FRUIT, 2).setUnlocalizedName(Strings.BUSH_FRUIT_NAME);

View file

@ -5,6 +5,7 @@ import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -16,7 +17,7 @@ import MysticWorld.Lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemImbuedShard extends ItemMysticWorld {
public class ItemImbuedShard extends Item {
private Icon[] icons;

View file

@ -0,0 +1,35 @@
package MysticWorld.Items;
import MysticWorld.MysticWorld;
import MysticWorld.Entity.EntityChargeAir;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class ItemOrbAir extends Item {
public ItemOrbAir(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(500);
this.setCreativeTab(MysticWorld.MysticWorldTab);
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
entityPlayer.addVelocity(0, 2.5, 0);
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}
}

View file

@ -0,0 +1,32 @@
package MysticWorld.Items;
import MysticWorld.MysticWorld;
import MysticWorld.Entity.EntityChargeAir;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemOrbEarth extends Item {
public ItemOrbEarth(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(64);
this.setCreativeTab(MysticWorld.MysticWorldTab);
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}
}

View file

@ -0,0 +1,32 @@
package MysticWorld.Items;
import MysticWorld.MysticWorld;
import MysticWorld.Entity.EntityChargeAir;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemOrbEnergy extends Item {
public ItemOrbEnergy(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(64);
this.setCreativeTab(MysticWorld.MysticWorldTab);
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}
}

View file

@ -0,0 +1,32 @@
package MysticWorld.Items;
import MysticWorld.MysticWorld;
import MysticWorld.Entity.EntityChargeAir;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemOrbFire extends Item {
public ItemOrbFire(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(64);
this.setCreativeTab(MysticWorld.MysticWorldTab);
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}
}

View file

@ -0,0 +1,32 @@
package MysticWorld.Items;
import MysticWorld.MysticWorld;
import MysticWorld.Entity.EntityChargeAir;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemOrbWater extends Item {
public ItemOrbWater(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(64);
this.setCreativeTab(MysticWorld.MysticWorldTab);
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}
}

View file

@ -69,7 +69,12 @@ public class Lang
LanguageRegistry.instance().addName(ItemHandler$1.iridiumChestplate, "Iridium Chestplate");
LanguageRegistry.instance().addName(ItemHandler$1.iridiumLeggings, "Iridium Leggings");
LanguageRegistry.instance().addName(ItemHandler$1.iridiumBoots, "Iridium Boots");
LanguageRegistry.instance().addName(ItemHandler$1.fireOrb, "Fire Orb");
LanguageRegistry.instance().addName(ItemHandler$1.waterOrb, "Water Orb");
LanguageRegistry.instance().addName(ItemHandler$1.earthOrb, "Earth Orb");
LanguageRegistry.instance().addName(ItemHandler$1.airOrb, "Air Orb");
LanguageRegistry.instance().addName(ItemHandler$1.earthOrb, "Energy Orb");
for(int i=0;i<12;i++)
{

View file

@ -12,6 +12,7 @@ public class ItemIds {
public static int EARTH_STAFF_DEFAULT = 5507;
public static int AIR_STAFF_DEFAULT = 5508;
public static int ENERGY_STAFF_DEFAULT = 5509;
public static int STAFF_POWER_DEFAULT = 5510;
public static int BUSH_FRUIT_DEFAULT = 5511;
@ -20,19 +21,27 @@ public class ItemIds {
public static int VERDITE_CHESTPLATE_DEFAULT = 5513;
public static int VERDITE_LEGGINGS_DEFAULT = 5514;
public static int VERDITE_BOOTS_DEFAULT = 5515;
public static int MITHRIL_HELMET_DEFAULT = 5516;
public static int MITHRIL_CHESTPLATE_DEFAULT = 5517;
public static int MITHRIL_LEGGINGS_DEFAULT = 5518;
public static int MITHRIL_BOOTS_DEFAULT = 5519;
public static int ADAMANTINE_HELMET_DEFAULT = 5520;
public static int ADAMANTINE_CHESTPLATE_DEFAULT = 5521;
public static int ADAMANTINE_LEGGINGS_DEFAULT = 5522;
public static int ADAMANTINE_BOOTS_DEFAULT = 5523;
public static int IRIDIUM_HELMET_DEFAULT = 5524;
public static int IRIDIUM_CHESTPLATE_DEFAULT = 5525;
public static int IRIDIUM_LEGGINGS_DEFAULT = 5526;
public static int IRIDIUM_BOOTS_DEFAULT = 5527;
public static int FIRE_ORB_DEFAULT = 5528;
public static int WATER_ORB_DEFAULT = 5529;
public static int EARTH_ORB_DEFAULT = 5530;
public static int AIR_ORB_DEFAULT = 5531;
public static int ENERGY_ORB_DEFAULT = 5532;
//Current Item IDs
public static int STAFF_PARTS;
@ -44,6 +53,7 @@ public class ItemIds {
public static int EARTH_STAFF;
public static int AIR_STAFF;
public static int ENERGY_STAFF;
public static int STAFF_POWER;
public static int BUSH_FRUIT;
@ -52,17 +62,25 @@ public class ItemIds {
public static int VERDITE_CHESTPLATE;
public static int VERDITE_LEGGINGS;
public static int VERDITE_BOOTS;
public static int MITHRIL_HELMET;
public static int MITHRIL_CHESTPLATE;
public static int MITHRIL_LEGGINGS;
public static int MITHRIL_BOOTS;
public static int ADAMANTINE_HELMET;
public static int ADAMANTINE_CHESTPLATE;
public static int ADAMANTINE_LEGGINGS;
public static int ADAMANTINE_BOOTS;
public static int IRIDIUM_HELMET;
public static int IRIDIUM_CHESTPLATE;
public static int IRIDIUM_LEGGINGS;
public static int IRIDIUM_BOOTS;
public static int FIRE_ORB;
public static int WATER_ORB;
public static int EARTH_ORB;
public static int AIR_ORB;
public static int ENERGY_ORB;
}

View file

@ -32,9 +32,16 @@ public class Strings {
public static final String AIR_STAFF_NAME = "airStaff";
public static final String ENERGY_STAFF_NAME = "energyStaff";
public static final String BUSH_FRUIT_NAME = "bushFruit";
public static final String POWER_STAFF_NAME = "staffPoweredItem";
public static final String FIRE_ORB_NAME = "fireOrb";
public static final String WATER_ORB_NAME = "waterOrb";
public static final String EARTH_ORB_NAME = "earthOrb";
public static final String AIR_ORB_NAME = "airOrb";
public static final String ENERGY_ORB_NAME = "energyOrb";
public static final String BUSH_FRUIT_NAME = "bushFruit";
public static final String VERDITE_HELMET_NAME = "verditeHelmet";
public static final String VERDITE_CHESTPLATE_NAME = "verditeChestplate";
public static final String VERDITE_LEGGINGS_NAME = "verditeLeggings";