Name Related procedure blocks

Published by Hidan on
Status
Resolved
Issue description

Can we get procedure blocks related to Players name?

To be more specific blocks such as:
Get Player name
Get Player ID
Mark as companion player with name ID

and for mob
Follow player with ID
Protect player with ID
Despawn Mob binded to players ID

Ok so now a bit of info why I want this to be added:
So getting player name could be used to create messages that are using Players name or when using procedure block that changes Item/Block/Entity Name
or can also be used to create zombie with dead player name like its turning into zombie

About the one related to ID: they can be used to make companions just like wolfes or cats so they are binded to player and can behave like them "which is teleporting when they are too far" 
additionaly with that we are able to make binded blocks like safe blocks or even vending machines :D

Here is Instance for getting players ID

playerInstance.getGameProfile().getId()

and for getting players Name I think getting UUID should be the thing
 

public static EntityPlayer getPlayerFromUUID(UUID uuid)
    {
        return getPlayerFromUsername(getUsernameFromUUID(uuid));
    }

    public static UUID getUUIDFromPlayer(EntityPlayer player)
    {
        return player.getGameProfile().getId();
    }

 

Issue comments

To get the player name, you can use get entity name procedure block.

and for mob
Follow player with ID
Protect player with ID

These belong in AI more than in procedures and are currently out of the scope of MCreator as these are custom defined AI tasks.

Despawn Mob binded to players ID

Players can not be despawned.