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

@ -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;
}
}