Esempio n. 1
0
  protected ChatHoverable aP() {
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    String s = EntityTypes.b(this);

    nbttagcompound.setString("id", this.getUniqueID().toString());
    if (s != null) {
      nbttagcompound.setString("type", s);
    }

    nbttagcompound.setString("name", this.getName());
    return new ChatHoverable(
        EnumHoverAction.SHOW_ENTITY, new ChatComponentText(nbttagcompound.toString()));
  }
Esempio n. 2
0
  public IChatBaseComponent C() {
    ChatComponentText chatcomponenttext = new ChatComponentText(this.getName());

    if (this.hasName()) {
      chatcomponenttext.getChatModifier().setItalic(Boolean.valueOf(true));
    }

    IChatBaseComponent ichatbasecomponent =
        (new ChatComponentText("[")).addSibling(chatcomponenttext).a("]");

    if (this.item != null) {
      NBTTagCompound nbttagcompound = new NBTTagCompound();

      this.save(nbttagcompound);
      ichatbasecomponent
          .getChatModifier()
          .setChatHoverable(
              new ChatHoverable(
                  EnumHoverAction.SHOW_ITEM, new ChatComponentText(nbttagcompound.toString())));
      ichatbasecomponent.getChatModifier().setColor(this.u().e);
    }

    return ichatbasecomponent;
  }