I'm trying to make my entity be tamed once it is tamed, by right clicking it while holding shift with a certain item. I get no errors, and Minecraft runs fine, but I have a problem. When I right click the entity, the GUI comes up fine, but in the name slot it says null. First off I want to get rid of that. Also, when I try to backspace on the null, my minecraft crashes. Here is my code:
EntityConsuela segment (NOT FULL CODE):
used = false;
if(tamed && entityplayer.isSneaking())
{
ModLoader.OpenGUI(ModLoader.getMinecraftInstance().thePlayer, new GUIConsuelaname(this));
return true;
}
Ok, I almost got it. Now it doesn't crash when I type, and it doesn't say null, but I want it to say the name above the Entity. I will post my updated code, but how to I change it to make the name above the head show up?
EntityConsuela segment (NOT FULL CODE):
GUIConsuelaname:
EDIT: This is kinda urgent.
EntityConsuela:
GUIConsuelaname: