Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package melonslise.runicinscription.common.entity;
- import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
- import melonslise.runicinscription.RunicInscription;
- import melonslise.runicinscription.common.network.MessageParticle;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.world.World;
- public class EntityFirerain extends Entity
- {
- private int ticks = 60;
- public EntityFirerain(World world, EntityPlayer player)
- {
- super(world);
- }
- @Override
- protected void entityInit()
- {
- }
- @Override
- public void onUpdate()
- {
- super.onUpdate();
- if (ticks > 0)
- {
- if (ticks % 5 == 0)
- {
- for (int i = 0; i < 50; ++i)
- {
- TargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 32.0D);
- 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);
- }
- }
- --ticks;
- }
- else
- {
- if (!this.worldObj.isRemote)
- {
- this.setDead();
- }
- }
- }
- @Override
- protected void readEntityFromNBT(NBTTagCompound compound)
- {
- }
- @Override
- protected void writeEntityToNBT(NBTTagCompound compound)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement