Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. public class EntityParasiteEgg extends EntityThrowable {
  2. public EntityParasiteEgg(World world, double x, double y, double z) {
  3. super(world, x, y, z);
  4. }
  5.  
  6. @Override
  7. protected void onImpact(MovingObjectPosition position) {
  8.  
  9. if (!this.worldObj.isRemote) {
  10.  
  11. EntityItem egg = new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(ItemRegistry.baseParasite, 1, this.g));
  12. egg.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
  13. this.worldObj.spawnEntityInWorld(egg);
  14. }
  15.  
  16. for (int j = 0; j < 8; ++j) {
  17. this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
  18. }
  19.  
  20. if (!this.worldObj.isRemote) {
  21. this.setDead();
  22. }
  23.  
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement