Advertisement
gottabadfeeling

Paper Mario Mod 1.8 - Thunder Rage Item Definition

Apr 18th, 2015
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. package com.gottabadfeeling.mod.papermario.items;
  2.  
  3. import net.minecraft.entity.effect.EntityLightningBolt;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.item.Item;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.util.BlockPos;
  8. import net.minecraft.util.EnumFacing;
  9. import net.minecraft.world.World;
  10.  
  11. public class ItemThunderRage extends Item {
  12.  
  13.     @Override
  14.     public boolean onItemUse(ItemStack stack, EntityPlayer playerIn,
  15.             World worldIn, BlockPos pos, EnumFacing side, float hitX,
  16.             float hitY, float hitZ)
  17.     {
  18.         //Summons an ARRAY of lightning bolts for increased damage and louder sound than ItemThunderBolt causes!
  19.         //It works! I tested this!
  20.         //Disclaimer: I couldn't get any item to be spent entirely and removed from the inventory on use. Fix this when necessary.
  21.         EntityLightningBolt[] bolts = new EntityLightningBolt[4];
  22.         for(int i = 0; i < bolts.length; i++)
  23.         {
  24.             bolts[i] = new EntityLightningBolt(worldIn, pos.getX(), pos.getY(), pos.getZ());
  25.             worldIn.addWeatherEffect(bolts[i]);
  26.         }
  27.        
  28.         return false;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement