How does damage scaling on ranged projectiles work?

Started by ThatUmbreon on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How does damage scaling on ranged projectiles work?

I was trying to make a laser tag mod, so I started by making a test blaster. However, when I programmed it to only deal a single heart of damage, it instead decided to OHKO cows.

I inspected the code and found a line of code that looked like it could have the answer, but I'm not sure.

Please help.

entityarrow.shoot(d1, d0 - entityarrow.getPosY() + (double) MathHelper.sqrt(d1 * d1 + d3 * d3) * 0.2F, d3, 6f * 2, 12.0F)
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, I figured it out…
Sun, 01/08/2023 - 23:46

Nevermind, I figured it out.

Apparently "Damage(2)" means "Damage Multiplier" and it multiplies itself with the Power(6f) to get a final amount of damage(12.0f).

I simply changed Damage to 0.3 so true damage was 2.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Gosh but when i set the…
Thu, 05/11/2023 - 18:10

Gosh but when i set the power to 20 and damoage to 0.0000000000000000000000001 it still 1 shot iron golem