Help with XP

Started by Otherworldy921 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with XP

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. 

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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,

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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>"

Joined Oct 2019
Points:

User statistics:

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

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

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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