Advertisement
Guest User

EntityFrag

a guest
Jun 24th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package com.ExtraCraft.Items;
  2.  
  3. import net.minecraft.entity.projectile.EntityThrowable;
  4. import net.minecraft.util.MovingObjectPosition;
  5. import net.minecraft.world.World;
  6. import net.minecraft.entity.Entity;
  7. import net.minecraft.entity.EntityLivingBase;
  8.  
  9. public class EntityFrag extends EntityThrowable {
  10.  
  11. public EntityFrag(World p_i1776_1_) {
  12. super(p_i1776_1_);
  13. // TODO Auto-generated constructor stub
  14. }
  15.  
  16. public EntityFrag(World world, EntityLivingBase entity){
  17. super(world, entity);
  18. }
  19.  
  20.  
  21.  
  22. @Override
  23. protected void onImpact(MovingObjectPosition p_70184_1_) {
  24. for(int i = 0; i < 10; i++){
  25. this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0f, 0f, 0f);
  26. }
  27.  
  28. if(this.worldObj.isRemote){
  29. this.setDead();
  30. if(this.worldObj.isRemote){
  31. this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 5f, true);
  32.  
  33. }
  34. }
  35.  
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement