Minecraft Data Packs / Other

Raycasting Custom Damage Onto Mobs

  • check_circle Functions
  • 1,734 views, 2 today
  • 113 downloads, 0 today
  • 4
  • 4
  • 3
ItsBassett's Avatar ItsBassett
Level 38 : Artisan 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
CompatibilityMinecraft 1.16
Tags

Create an account or sign in to comment.

1
12/25/2020 4:57 am
Level 37 : Artisan Princess
Kate1902019
Kate1902019's Avatar
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?
2
12/25/2020 11:36 pm
Level 38 : Artisan Miner
ItsBassett
ItsBassett's Avatar
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
1
12/26/2020 12:28 am
Level 37 : Artisan Princess
Kate1902019
Kate1902019's Avatar
Ok
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome