added magical orbs. so far the air orb is the only one with functionality.
This commit is contained in:
parent
61ce5e3bce
commit
f3ebfbc7c1
11 changed files with 238 additions and 23 deletions
32
common/MysticWorld/Items/ItemOrbFire.java
Normal file
32
common/MysticWorld/Items/ItemOrbFire.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue