Help with XP

Started by Otherworldy921 on Fri, 04/09/2021 - 17:12

Topic category: Help with modding (Java Edition)

Last seen on 01:00, 12. Apr 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with XP
Fri, 04/09/2021 - 17:12

I am using an older mcreator because I wanted to make a 1.12.2 mod and I wanted to make a sword that gives experience everytime you hit a mob. But, when I did the “when mob is hit with tool” toggle and put the procedure block “add xp to provided player” and it didn’t work when I got into the game. I can’t figure out what I did wrong. 

Last seen on 01:13, 28. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Instead of giving XP to the …
Fri, 04/09/2021 - 17:19

Instead of giving XP to the 'target entity',

insert 'source entity' into the block.

 

I can't remember if source entity already exists in 1.12.2,

but if it does, try it :D

Last seen on 01:00, 12. Apr 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
But, it only lets me do add…
Fri, 04/09/2021 - 20:39

But, it only lets me do add xp to provided player. There is no way to change it. I thought provided player would refer to the holder of the sword, but I guess not. Maybe it means if I hit a player with it? I want it to give me xp but for some reason it doesn't. I tried attacking mobs and nothing happens. Maybe I should try giving a mob the sword and having them hit me and see what happens

Last seen on 01:13, 28. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes, try it :D The source…
Fri, 04/09/2021 - 20:41

Yes, try it :D

The source entity is the one attacking the target entity.

Last seen on 01:13, 28. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think there's a block in…
Fri, 04/09/2021 - 20:42

I think there's a block in Blockly Editor.

Last seen on 01:00, 12. Apr 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I tried it when a zombie had…
Fri, 04/09/2021 - 22:01

I tried it when a zombie had the sword and he hit me and I gained no XP. I don't know why the add xp block isn't working. Also, I would add source entity, but the add xp block doesn't let me change the target. It only says to provided player,

Last seen on 01:13, 28. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I have an idea :D You could…
Fri, 04/09/2021 - 22:04

I have an idea :D

You could use commands!

Execute as [source entity] command "/xp @p <amount>"

Last seen on 01:13, 28. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
My bad. I mean "/xp <int> @p"
Fri, 04/09/2021 - 22:05

My bad. I mean "/xp <int> @p"

Last seen on 01:00, 12. Apr 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you! That worked, not…
Fri, 04/09/2021 - 22:11

Thank you! That worked, not sure why I didn't think of that lol