How to make an arrow that upon hitting a player steals xp and gives it to the player who shot it?

Started by AlfonixJohnson on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an arrow that upon hitting a player steals xp and gives it to the player who shot it?

I tried and couldn't get it to work but I could do it on a sword

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, but this does not…
Wed, 11/19/2025 - 23:30

Thanks, but this does not work with my special arrow type

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried; it doesnt allow for…
Thu, 11/20/2025 - 01:24

I tried; it doesnt allow for the use of the "Provided Damage Source" dependency

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try just removing 5 xp
Thu, 11/20/2025 - 02:29

try just removing 5 xp

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I read that wrong…
Thu, 11/20/2025 - 02:34

Sorry, I read that wrong. Just remove that part.

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried then it doesnt work
Thu, 11/20/2025 - 02:46

I tried then it doesnt work

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe try what I mistakenly…
Thu, 11/20/2025 - 04:35

maybe try what I mistakenly said last time and make it just remove 5 xp

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want this to be on a…
Thu, 11/20/2025 - 21:28

If you want this to be on a custom projectile, then use my exact code except the check for arrow damage type, and place it in the "when hits living entity" custom trigger that thatperson_ is showing. I would say to use the player one, but if a player is using this, then the trigger will also effect them too when they shoot it, so it's better to just check for a player in the living entity trigger.

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried to do that but it…
Thu, 11/20/2025 - 22:37

I tried to do that but it wont let me add it to the when hits living entities because of "missing dependancies"

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh that is because of the…
Fri, 11/21/2025 - 00:08

Oh that is because of the amount dependency, I added that in order to scale xp with the damage done, but you can remove that and just have it take and give 5 xp. 

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried it just doesnt work
Fri, 11/21/2025 - 01:49

I tried it just doesnt work

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you trying this on…
Fri, 11/21/2025 - 02:47

Are you trying this on another player? If not you can set the [target entity sub type] to something other than "Player" or just remove it.

And if you are using this on the projectile  trigger, you can also remove the top "entity is attacked" trigger if you still have it as you are using the projectile to trigger it instead.
 

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's an awesome concept …
Fri, 11/21/2025 - 16:59

That's an awesome concept "vampire" arrows they just suck the XP from the victim and give it to the shooter.