Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.82 KB | None | 0 0
  1. package melonslise.runicinscription.common.entity;
  2.  
  3. import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
  4. import melonslise.runicinscription.RunicInscription;
  5. import melonslise.runicinscription.common.network.MessageParticle;
  6. import net.minecraft.entity.Entity;
  7. import net.minecraft.entity.player.EntityPlayer;
  8. import net.minecraft.nbt.NBTTagCompound;
  9. import net.minecraft.world.World;
  10.  
  11. public class EntityFirerain extends Entity
  12. {
  13.     private int ticks = 60;
  14.    
  15.     public EntityFirerain(World world, EntityPlayer player)
  16.     {
  17.         super(world);
  18.     }
  19.  
  20.     @Override
  21.     protected void entityInit()
  22.     {
  23.        
  24.     }
  25.    
  26.     @Override
  27.     public void onUpdate()
  28.     {
  29.         super.onUpdate();
  30.        
  31.         if (ticks > 0)
  32.         {
  33.             if (ticks % 5 == 0)
  34.             {
  35.                 for (int i = 0; i < 50; ++i)
  36.                 {
  37.                     TargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 32.0D);
  38.                    
  39.                     RunicInscription.network.sendToAllAround(new MessageParticle("flame", this.posX + (this.rand.nextInt(12) - 6) + ((this.rand.nextGaussian())* 0.1) - ((this.rand.nextGaussian() * 0.1)), this.posY + 5D + this.rand.nextInt(8) * 0.5, this.posZ +(this.rand.nextInt(12) - 6) + ((this.rand.nextGaussian()* 0.1) - ((this.rand.nextGaussian() * 0.1))), (this.rand.nextInt(10) - 5) * 0.02, -0.8D +this.rand.nextGaussian() * 0.02, (this.rand.nextInt(10) -5) * 0.02), point);
  40.                 }
  41.             }
  42.  
  43.             --ticks;
  44.         }
  45.         else
  46.         {
  47.             if (!this.worldObj.isRemote)
  48.             {
  49.                 this.setDead();
  50.             }
  51.         }
  52.     }
  53.  
  54.     @Override
  55.     protected void readEntityFromNBT(NBTTagCompound compound)
  56.     {
  57.        
  58.     }
  59.  
  60.     @Override
  61.     protected void writeEntityToNBT(NBTTagCompound compound)
  62.     {
  63.        
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement