how to make sword remember mobs it killed?

Started by nuhauponosik228 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make sword remember mobs it killed?

i want to make a sword that will remember mobs that it killed and will have bonus damage against them but i don't know how to make that, when using string variable it only works for one entity at a time.

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
List of strings probably…
Sun, 09/29/2024 - 12:58

List of strings probably. When it kills a mob, add it’s id to the list. If the mob is in that list then do bonus damage

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(You’re also gonna want to…
Sun, 09/29/2024 - 13:01

(You’re also gonna want to save and get the list from the item’s nbt data; otherwise the list will be saved globally for all of the swords in the world)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks, it started working
Sun, 09/29/2024 - 15:46

thanks, it started working