Place a player name or uuid inside a block NBT

Started by OutroNinja on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Place a player name or uuid inside a block NBT

Basically what the title says, I would like to add an nbt when the block is placed for the player's name or uuid. I wanted to do this to prevent people other than the owner of that block from being able to break it. I'm using MCreator version 2023.1 (Minecraft version: 1.19.2)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I forgot to tell you but I…
Sun, 01/21/2024 - 13:01

I forgot to tell you but I already solved it, for those who would like to know how to do it:
Create a procedure like "When Block is placed by", add a Set NBT text tag. And add a Get (display) name of event/target entity. It's that simple but I had several difficulties because I was using the "When Block Added" event.Code Preview

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How did u manage to i can't…
Mon, 08/26/2024 - 15:07

How did u manage to i can't see the image

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having a similar problem…
Tue, 02/04/2025 - 21:21

I'm having a similar problem, but instead it's multiple UUIDs. I've tried the ArrayList plugin, which did nothing. Something like {WList:["UUID1","UUID2"..."UUIDn"]}. I don't want to have to store each UUID as a separate tag (i.e. {WList1:"UUID1",WList2:"UUID2",WListn:"UUIDn"), and I'm too scared of modding Minecraft in raw Java. Please help.

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think It would be much…
Sun, 02/23/2025 - 10:23

I think It would be much easier if you stored a team/party name for multiple players or doing

if entity is named main_player or entity is tagged "main_player" + "_allowed"

and then u just make a command that allows the mainplayer to tag others with 'main_player" + "_allowed"