How to make a cool beam attack

Started by Testermodss on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a cool beam attack

Helloooo, today I wanted post about how to make a beam attack since there isn't anything really helpful out there that I've seen that shows how to do this correctly and also just because I thought what I made was cool. I decided to post mine to help others out who need it and to also hear some tips to improve the procedure further. This is it right here..... https://www.mediafire.com/file/izp43ghav8ep0pi/BeamCopy.ptpl/file 

It uses NBT tags to store where the player is looking in the first interation, so it doesn't move when the player is moving during the attack. To sum it up during each interation it moves the position of the attack forward using look angles and increases the multiplier tag so it keeps increasing the distance each time. Im using local variables so when the next interations start they are back to zero giving the constant beam like look. It does exactly what u see as its hits anything inside the beam not just the end. I also added a break block feature that breaks the blocks according to their hardness and a random variable, so it gives a randomized destruction look. This procedure uses many particles for its look so its not exactly a hd high quality beam, but it works.

This is a video to show what it looks like....  https://i.imgur.com/BG94g9I.mp4 (btw its acts weird on blocks like that because of how I'm nerfing the destruction of it. If u don't care just remove the random variables:) Of course some people might know better ways of achieving this, but this is just what I came up with.

=