Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gottabadfeeling.mod.papermario.items;
- import net.minecraft.entity.effect.EntityLightningBolt;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.util.BlockPos;
- import net.minecraft.util.EnumFacing;
- import net.minecraft.world.World;
- public class ItemThunderRage extends Item {
- @Override
- public boolean onItemUse(ItemStack stack, EntityPlayer playerIn,
- World worldIn, BlockPos pos, EnumFacing side, float hitX,
- float hitY, float hitZ)
- {
- //Summons an ARRAY of lightning bolts for increased damage and louder sound than ItemThunderBolt causes!
- //It works! I tested this!
- //Disclaimer: I couldn't get any item to be spent entirely and removed from the inventory on use. Fix this when necessary.
- EntityLightningBolt[] bolts = new EntityLightningBolt[4];
- for(int i = 0; i < bolts.length; i++)
- {
- bolts[i] = new EntityLightningBolt(worldIn, pos.getX(), pos.getY(), pos.getZ());
- worldIn.addWeatherEffect(bolts[i]);
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement