Custom enchantment that applies and custom effect only works on custom tools

Started by SomeOne10YT on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom enchantment that applies and custom effect only works on custom tools

I've been working on a Minecraft mod for awhile now, and in this mod there is a custom enchantment that applies darkness to the entity attacked, good for multiplayer.

Unfortunately it only seems to work when on the custom toolset I added, I've spent forever trying to make it work on normal swords and axes, can somebody help?

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make it only work on a tag…
Tue, 12/31/2024 - 01:43

Make it only work on a tag and then tag it to a list of swords you made or the swords enchant able tag.

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried this, but I'm stupid…
Tue, 12/31/2024 - 02:17

I tried this, but I'm stupid and can't seem to program it to work off of the tag I made, could you attach a script that works?

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just make it so it checks if…
Wed, 01/01/2025 - 00:53

just make it so it checks if the item in the main hand is enchanted with that enchantment similar to this

https://imgur.com/a/WQCCL2U

 

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks Cheese Dealer! I’ll…
Wed, 01/01/2025 - 01:02

Thanks Cheese Dealer!

I’ll try that script when I get the chance!

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Once I get the chance to add…
Wed, 01/01/2025 - 02:23

Once I get the chance to add that script, are you okay with me adding your username to the changelog and description for credits? I’ve been wanting to get this to work since release (Late Dec 2022) but I couldn’t figure out how.

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sure im totally cool with…
Wed, 01/01/2025 - 04:21

Sure im totally cool with that

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright I’ll add your name…
Wed, 01/01/2025 - 04:26

Alright I’ll add your name to the mod credits and changelog once I add this fix!

 

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
good luck on your mod
Wed, 01/01/2025 - 04:29

good luck on your mod

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! Good luck with yours…
Wed, 01/01/2025 - 04:31

Thanks!

Good luck with yours as well!