Remotely Transferring block NBT to Player

Started by TheKingOfSpades on

Topic category: Help with modding (Java Edition)

Last seen on 17:32, 21. Aug 2020
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Remotely Transferring block NBT to Player

Hello! Is anyone familiar with a way to remotely transfer a block's NBT number tag to a player's NBT or persistent variable?

I have a block which gathers "energy" and I would like it to automatically store it in the player so that it can be accessed anywhere. The problem is, when I incorporate player persistent variables or entity number tags in a block tick procedure the workspace reports an error and says I am missing dependencies.

I have tried binding the block to the player with a text tag which is generated upon the block being placed and then compared to the nearest player's display name, but this hasn't worked either.

Let me know if you might have a solution. Thank you!

Last seen on 17:32, 21. Aug 2020
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As a quick fix I was able to…
Thu, 08/13/2020 - 04:12

As a quick fix I was able to cheat and have an invisible entity spawn and do all the NBT tag transferring.

I imagine this is horribly laggy though.