How would I get the 'local' player?

Started by funnytevinn on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I get the 'local' player?

In my mod, I need to access a global player persistent variable from another entity.

 

My procedure is kind of like this :

On loaded entity tick update

if entity is subtype of villager

<add 1 to the PLAYER's player-persistent global variable>

 

How would I get the player in this way?