Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.frank.pokemod.entity.projectile;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.projectile.EntityThrowable;
- import net.minecraft.util.DamageSource;
- import net.minecraft.util.MovingObjectPosition;
- import net.minecraft.world.World;
- public class EntityPokeball extends EntityThrowable
- {
- private static final String __OBFID = "CL_00001722";
- public EntityPokeball(World par1World)
- {
- super(par1World);
- }
- public EntityPokeball(World par1World, EntityLivingBase par2EntityLivingBase)
- {
- super(par1World, par2EntityLivingBase);
- }
- public EntityPokeball(World par1World, double par2, double par4, double par6)
- {
- super(par1World, par2, par4, par6);
- }
- /**
- * Called when this EntityThrowable hits a block or entity.
- */
- protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
- {
- if (par1MovingObjectPosition.entityHit != null)
- {
- byte b0 = 0;
- par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
- }
- if (!this.worldObj.isRemote)
- {
- this.setDead();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement