Advertisement
Keyblade_crafter

EntityPokeball

May 9th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. package com.frank.pokemod.entity.projectile;
  2.  
  3. import net.minecraft.entity.EntityLivingBase;
  4. import net.minecraft.entity.projectile.EntityThrowable;
  5. import net.minecraft.util.DamageSource;
  6. import net.minecraft.util.MovingObjectPosition;
  7. import net.minecraft.world.World;
  8.  
  9. public class EntityPokeball extends EntityThrowable
  10. {
  11.     private static final String __OBFID = "CL_00001722";
  12.  
  13.     public EntityPokeball(World par1World)
  14.     {
  15.         super(par1World);
  16.     }
  17.  
  18.     public EntityPokeball(World par1World, EntityLivingBase par2EntityLivingBase)
  19.     {
  20.         super(par1World, par2EntityLivingBase);
  21.     }
  22.  
  23.     public EntityPokeball(World par1World, double par2, double par4, double par6)
  24.     {
  25.         super(par1World, par2, par4, par6);
  26.     }
  27.  
  28.     /**
  29.      * Called when this EntityThrowable hits a block or entity.
  30.      */
  31.     protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
  32.     {
  33.         if (par1MovingObjectPosition.entityHit != null)
  34.         {
  35.             byte b0 = 0;          
  36.  
  37.             par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
  38.         }
  39.  
  40.         if (!this.worldObj.isRemote)
  41.         {
  42.             this.setDead();
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement