Data Packs Other

Raycasting Custom Damage Onto Mobs

  • 2k views 0 today
  • save_alt 127 downloads
Compatibility
Minecraft 1.16
Changes include
  • Functions
  • 4
  • 4
  • 3
ItsBassett
Lvl 41Master Miner
5
Made for someone's question on Reddit but anyone can use

Allows the player to right click the carrot on a stick and "shoot" and damage any entity. Works very well in singleplayer and on any mob that is about the size of the player: zombies, skeletons, husks, creepers, pillagers, witches, etc. Works fine with other mobs.
Does NOT work on players.

When you load the pack up/ reload the pack, it sets the damage of the "shot" to 5 for everyone in the world. You will need to manually set the damage for everyone not in the world at that time, or reload again. The damage can be easily be changed with:
/scoreboard players set @p damage #
where # is the amount of damage you want to do.

It works in multiplayer, but can be inaccurate if multiple people have different damage values near each other.

The particles are more or less visual feedback and can easily be changed

More like this

  Have something to say?

Kate1902019
12/25/2020 4:57 am
Level 39 : Artisan Princess
Killing mobs doesn't count on my statistics.
It's not adding or number of killing going up when I kill mobs. Why?
Why killing mobs using this datapack doesn't count?
1
ItsBassett
12/25/2020 11:36 pm
Level 41 : Master Miner
It doesn't track kills because the player isn't what is damaging the mob. The raycast function is. It just modifies the mobs' health to lower it until it dies. There are some possible ways to attempt to track total kills but I didn't put them in the pack because I was just making this for someone on reddit. But if you want help, feel free to message me on discord Blake#4276
2
Kate1902019
12/26/2020 12:28 am
Level 39 : Artisan Princess
Ok
1

Welcome