Using an item

Started by Kooral00 on

Topic category: Help with modding (Java Edition)

Last seen on 16:55, 17. Oct 2023
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using an item

How to make the sword able to be used from a given experience level (let's say lvl 5), if someone doesn't have the required level it doesn't deal damage to anything

Last seen on 14:57, 22. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could run a procedure…
Fri, 10/20/2023 - 20:15

You could run a procedure that replaces the sword with a harmless variant in the player's main hand, if their experience falls below a certain level, making sure to retain the enchantments, custom name, etc. Then doing the reverse if they're holding the weakened version of the sword.

...This can be kind of complicated though, so if you want a simpler method, you could just apply like 1 second of high level weakness whenever the player is holding the sword.