Advertisement
Guest User

Untitled

a guest
Dec 10th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. package DSFoFG.entities;
  2.  
  3. import net.minecraft.entity.EntityLivingBase;
  4. import net.minecraft.entity.monster.EntityBlaze;
  5. import net.minecraft.entity.projectile.EntityThrowable;
  6. import net.minecraft.util.DamageSource;
  7. import net.minecraft.util.MovingObjectPosition;
  8. import net.minecraft.world.World;
  9.  
  10. public class EntityTD extends EntityThrowable
  11. {
  12. private static final String __OBFID = "CL_00001722";
  13.  
  14. public EntityTD(World p_i1773_1_)
  15. {
  16. super(p_i1773_1_);
  17.  
  18.  
  19. }
  20.  
  21. public EntityTD(World p_i1774_1_, EntityLivingBase p_i1774_2_)
  22. {
  23. super(p_i1774_1_, p_i1774_2_);
  24.  
  25. }
  26.  
  27. public EntityTD(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
  28. {
  29. super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
  30. }
  31.  
  32. /**
  33. * Called when this EntityThrowable hits a block or entity.
  34. */
  35. protected void onImpact(MovingObjectPosition p_70184_1_)
  36. {
  37. if (p_70184_1_.entityHit != null)
  38. {
  39. byte b0 = 5;
  40.  
  41. p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
  42. }
  43.  
  44. for (int i = 0; i < 8; ++i)
  45. {
  46. this.worldObj.spawnParticle("crit", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
  47. }
  48.  
  49. if (!this.worldObj.isRemote)
  50. {
  51. this.setDead();
  52.  
  53. }
  54.  
  55. this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)2.0F, true);
  56. this.setDead();
  57. }
  58.  
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement