Referring to the player

Started by Purple19842 on

Topic category: Advanced modding

Last seen on 05:14, 7. Jul 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Referring to the player

I am making a mod that needs to call a procedure from a ___rightClicked but not in the same procedure, how could i refer to the player from that second procedure?

 

The mod is meant for single-player, so I tried to set the player name as a string variable,  i don't know if i did it wrong or what, but even if the player's name is the variable, i can't get it to refer to that player specifically.

i need to check if the player has certain items in the inventory mostly. 

 

the main reason that i am doing this, is so that i can have a progression system, so in the main "when right clicked" procedure, it will just redirect things to a different procedure, based on a global variable

Last seen on 19:33, 18. Feb 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is in advanced. In the…
Fri, 06/30/2023 - 11:52

It is in advanced. In the advanced section of procedures there is a call procedure block. I believe. I will get back to you after I confirm.

Last seen on 05:14, 7. Jul 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i know that, but when i do…
Fri, 06/30/2023 - 14:40

i know that, but when i do that, the source entity is no longer the player, i need to be able to refer to the player from that second procedure

Last seen on 10:29, 3. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a block: For each…
Tue, 01/30/2024 - 15:52

There is a block:

For each player in the world as entity iterator

do:

With that block, you could track down the right player giving him some specific nbt.