Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.halestormxv.item;
- import java.util.List;
- import com.halestormxv.entity.EntityGrenade;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.util.EnumChatFormatting;
- import net.minecraft.world.World;
- public class dimGrenade extends Item {
- public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){
- this.setMaxStackSize(8);
- if(player.inventory.consumeInventoryItem(CelestialCraft_items.starSeedItem)){
- --itemstack.stackSize;
- }
- world.playSoundAtEntity(player, "mob.endermen.portal", 0.7F, 0.4F);
- if(!world.isRemote){
- world.spawnEntityInWorld(new EntityGrenade(world, player));
- }
- return itemstack;
- }
- @Override
- public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
- {
- par3List.add("");
- par3List.add("");
- par3List.add(EnumChatFormatting.DARK_RED + "Celestial Grenades are powerful explosives.");
- par3List.add(EnumChatFormatting.DARK_RED + "They can only be used if Starshards are");
- par3List.add(EnumChatFormatting.DARK_RED + "within your inventory.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement