Checking the distance between player and mobs from a custom mod

Started by plata_exe on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Checking the distance between player and mobs from a custom mod

I'm trying to make an item (an EMF reader to be precise) whose texture changes depending on the distance between the player and all the ghosts from the mod. I don't really know how to do so despite trying literally anything, can someone help?

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using item states, you can…
Sun, 09/10/2023 - 13:08

Using item states, you can change the color depending on a condition.

 

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For example, put a red…
Sun, 09/10/2023 - 13:10

For example, put a red texture when a mob is at 5 blocks, orange at 10...etc