Advertisement
Guest User

Untitled

a guest
Aug 21st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. package net.madcrazydrumma.skyrimcraft.entity.spell;
  2.  
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.entity.Entity;
  5. import net.minecraft.nbt.NBTTagCompound;
  6. import net.minecraft.world.World;
  7.  
  8. public class EntityShockwaveFX extends Entity
  9. {
  10. private double radius = 0.2D;
  11.  
  12. public EntityShockwaveFX(World worldIn, Entity sourceEntity) {
  13. super(worldIn);
  14. setSize(0, 0);
  15. setLocationAndAngles(sourceEntity.posX, sourceEntity.posY, sourceEntity.posZ, sourceEntity.rotationYaw, sourceEntity.rotationPitch);
  16. }
  17.  
  18. public void onUpdate() {
  19. super.onUpdate();
  20. for (int angle=0;angle<360;angle+=10)
  21. Minecraft.getMinecraft().effectRenderer.addEffect(new EntityReddustFX(worldObj, posX+radius*Math.cos(Math.toRadians(rotationYaw))*Math.cos(Math.toRadians(rotationPitch))*Math.cos(Math.toRadians(angle)), posY+radius*Math.sin(Math.toRadians(angle)), posZ+radius*Math.sin(Math.toRadians(rotationYaw))*Math.cos(Math.toRadians(rotationPitch))*Math.cos(Math.toRadians(angle)), 1, 0,191,255));
  22.  
  23. moveEntity(-Math.sin(Math.toRadians(rotationYaw))*Math.cos(Math.toRadians(rotationPitch)) , -Math.sin(Math.toRadians(rotationPitch)), Math.cos(Math.toRadians(rotationYaw))* Math.cos(Math.toRadians(rotationPitch)));
  24. radius+=0.15;
  25.  
  26. if(radius>5)
  27. setDead();
  28. }
  29.  
  30. @Override
  31. protected void entityInit() {
  32. }
  33.  
  34. @Override
  35. protected void readEntityFromNBT(NBTTagCompound tagCompound) {
  36. }
  37.  
  38. @Override
  39. protected void writeEntityToNBT(NBTTagCompound tagCompound) {
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement