Guest User

EntityGrenade

a guest
Jan 5th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package com.Looke81.BioWarfare.entity;
  2.  
  3. import net.minecraft.entity.Entity;
  4. import net.minecraft.entity.EntityLivingBase;
  5. import net.minecraft.entity.monster.EntityBlaze;
  6. import net.minecraft.entity.projectile.EntityThrowable;
  7. import net.minecraft.potion.Potion;
  8. import net.minecraft.potion.PotionEffect;
  9. import net.minecraft.util.MathHelper;
  10. import net.minecraft.util.MovingObjectPosition;
  11. import net.minecraft.world.World;
  12.  
  13. public class EntityGrenade extends EntityThrowable{
  14.  
  15. public EntityGrenade(World p_i1776_1_) {
  16. super(p_i1776_1_);
  17. // TODO Auto-generated constructor stub
  18. }
  19. public EntityGrenade(World world, EntityLivingBase entity){
  20. super(world, entity);
  21. }
  22. @Override
  23. protected void onImpact(MovingObjectPosition movingobjectposition) {
  24. for(int i = 0; i < 10;i++){}
  25.  
  26.  
  27. if(!this.worldObj.isRemote){
  28. //this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 2.5F, true);
  29. this.worldObj.spawnEntityInWorld(new EntityGrenadeEffect(this.worldObj));
  30. this.setDead();
  31. }
  32. }
  33.  
  34.  
  35.  
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment