I need help create a smite like enchantment for sword

Started by Beveyboygames on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help create a smite like enchantment for sword

So I have no idea why this isn't working, and I've been trying to figure it out for hours but could someone help me out to get this working

https://imgur.com/a/HZRvlIh

 

I've already tried without itemstacks too btw

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When you tired without…
Thu, 07/18/2024 - 11:39

When you tired without itemstack what did you replace It with?

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just used the item in main…
Thu, 07/18/2024 - 19:13

I just used the item in main hand of source entity block.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think that it would be…
Thu, 07/18/2024 - 19:24

I think that it would be better to use item in main hand again, and I just realized that probably endermen aren't tagged as "minecraft:enderman" since tags always contain more than one element, instead of that put there: is event/target entity (sub)type of: enderman

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've also tried something…
Thu, 07/18/2024 - 20:32

I've also tried something like this and it also did not work, and I also tested it with the (sub) type of: enderman block too

https://imgur.com/a/VvrB100

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did some tests with a…
Thu, 07/18/2024 - 20:36

I did some tests with a similiar procedure and it works, then I looked at yours again and I noticed that even if your tool is enchanted with level 3 enderphobia it will still count as level one, (because it checks if the player has the enchanted item in main hand in the "if" and in both the "else if" too, causing it to doing nothing if you don't have the item and go to the level one part of the procedure even if you have level two or three) maybe it actually deals more damage but since is just 3hp you don't notice.

check with a "if" if the player has the item with the enchantment in his main hand and inside that "if"  with another "if" and two "else if" check the level 

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it works now, ur literally a…
Thu, 07/18/2024 - 20:45

it works now, ur literally a lifesaver thank you so much :), I've been working on this for days T_T

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's a pleasure
Thu, 07/18/2024 - 20:48

It's a pleasure