wasliebob

Code

Nov 24th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. package thaumcraftextras.items.foci.entities;
  2.  
  3. import net.minecraft.entity.Entity;
  4. import net.minecraft.entity.EntityLiving;
  5. import net.minecraft.entity.EntityLivingBase;
  6. import net.minecraft.entity.projectile.EntityThrowable;
  7. import net.minecraft.potion.Potion;
  8. import net.minecraft.potion.PotionEffect;
  9. import net.minecraft.util.MovingObjectPosition;
  10. import net.minecraft.world.World;
  11.  
  12. public class ProjectileFreeze extends EntityThrowable
  13. {
  14. public ProjectileFreeze(World par1World)
  15. {
  16. super(par1World);
  17. }
  18.  
  19. public ProjectileFreeze(World par1World, EntityLivingBase par2EntityLivingBase)
  20. {
  21. super(par1World, par2EntityLivingBase);
  22. }
  23.  
  24. public ProjectileFreeze(World par1World, double par2, double par4, double par6)
  25. {
  26. super(par1World, par2, par4, par6);
  27. }
  28.  
  29.  
  30. protected void onImpact(MovingObjectPosition mop)
  31. {
  32. if (mop.entityHit != null)
  33. {
  34.  
  35. Entity hit = mop.entityHit;
  36.  
  37. System.out.print(hit.posX + "\n");
  38. System.out.print(hit.posY + "\n");
  39. System.out.print(hit.posZ + "\n");
  40.  
  41. int i = 0;
  42. while(i < 100)
  43. {
  44. hit.posX = hit.prevPosX;
  45. hit.posY = hit.posY;
  46. hit.posZ = hit.prevPosZ;
  47. i++;
  48. }
  49. }
  50.  
  51. if (!this.worldObj.isRemote)
  52. {
  53. this.setDead();
  54. }
  55. }
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment