Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentText


    if (icommandsender instanceof EntityPlayer) {
      EntityPlayer player = (EntityPlayer) icommandsender;
      for (Aspect as : Aspect.aspects.values()) {
        Thaumcraft.proxy.getResearchManager().completeAspect(player, as, (short) 99);
      }
      player.addChatComponentMessage(new ChatComponentText("Added 99 research to all aspects"));
    }

  }
View Full Code Here


  public void processCommand(ICommandSender icommandsender, String[] astring) {

    List<String> parents = Arrays.asList(ResearchHelper.kamiResearch.parentsHidden);
    List<String> unlocked = ResearchManager.getResearchForPlayer(icommandsender.getCommandSenderName());
    if (unlocked.containsAll(parents))
      ((EntityPlayer) icommandsender).addChatComponentMessage(new ChatComponentText("Yes"));
    else {
      ((EntityPlayer) icommandsender).addChatComponentMessage(new ChatComponentText("No"));
      List<String> list = new ArrayList<String>(parents);
      list.removeAll(unlocked);
      ((EntityPlayer) icommandsender).addChatComponentMessage(new ChatComponentText("Remaining: " + StringUtils.join(list, ',')));
      //EntityPlayer player=(EntityPlayer)icommandsender;
      //EntityGiantBrainyZombie bat=new EntityGiantBrainyZombie(player.worldObj);
      //bat.setPositionAndRotation(player.posX,player.posY,player.posZ,1,1);
      //player.worldObj.spawnEntityInWorld(bat);
    }
View Full Code Here

                    if (args[0].toUpperCase().equals(a.getName().toUpperCase())) {
                        try {
                            tile.primalTendencies.merge(a, Integer.parseInt(args[1]));
                            tile.reduceSaturatedAspects();
                        } catch (NumberFormatException e) {
                            sender.addChatMessage(new ChatComponentText("Invalid number"));
                        }
                    }
                }
            }
View Full Code Here

      } catch (Throwable e) {
        e.printStackTrace();
        List list = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord - 8, yCoord - 8, zCoord - 8, xCoord + 8, yCoord + 8, zCoord + 8));
        for (Object player : list) {
          ((EntityPlayer) player).addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Something went wrong with a Tool Dynamism Tablet! Check your FML log."));
          ((EntityPlayer) player).addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.ITALIC + e.getMessage()));
        }
      }
    }

    if (done) {
View Full Code Here

      for (IAdapterMethodsList<?> e : AdapterManager.objects.listExternalAdapters())
        builder.createDocForPeripheral("objectAdapter", e);

      builder.dump(output);
      sender.addChatMessage(new ChatComponentText("Done! Created file in " + output.getAbsolutePath()));
    } catch (Throwable t) {
      Log.warn(t, "Failed to execute dump command");
      sender.addChatMessage(new ChatComponentText("Failed to execute! Check logs"));

    }
  }
View Full Code Here

    }

    @Override
    public void printRaw(String msg) {
        for (String part : msg.split("\n")) {
            this.player.addChatMessage(new ChatComponentText(part));
        }
    }
View Full Code Here

    }

    @Override
    public void printDebug(String msg) {
        for (String part : msg.split("\n")) {
            this.player.addChatMessage(new ChatComponentText("\u00a77" + part));
        }
    }
View Full Code Here

    }

    @Override
    public void print(String msg) {
        for (String part : msg.split("\n")) {
            this.player.addChatMessage(new ChatComponentText("\u00a7d" + part));
        }
    }
View Full Code Here

    }

    @Override
    public void printError(String msg) {
        for (String part : msg.split("\n")) {
            this.player.addChatMessage(new ChatComponentText("\u00a7c" + part));
        }
    }
View Full Code Here

    if(conduit.getExternalConnections().isEmpty()) {
      sb.append(ITEM_HEADING);
      sb.append(" ");
      sb.append(ITEM_NO_CONNECTIONS);
      sb.append("\n");
      player.addChatComponentMessage(new ChatComponentText(sb.toString()));
      return;
    }
    for (ForgeDirection dir : conduit.getExternalConnections()) {
      ConnectionMode mode = conduit.getConnectionMode(dir);

      sb.append(ITEM_HEADING);
      sb.append(" ");
      sb.append(Lang.localize("gui.mjReader.connectionDir"));
      sb.append(" ");
      sb.append(dir);
      sb.append("\n");

      ItemConduitNetwork icn = (ItemConduitNetwork) conduit.getNetwork();
      if(mode.acceptsInput()) {
        color = "\u00A79 ";
        sb.append(color);

        if(input == null) {
          sb.append(Lang.localize("gui.mjReader.extractedItems"));
        } else {
          sb.append(Lang.localize("gui.mjReader.extractedItem"));
          sb.append(" ");
          sb.append(input.getDisplayName());
        }
        sb.append(" ");
        List<String> targets = icn.getTargetsForExtraction(conduit.getLocation().getLocation(dir), conduit, input);
        if(targets.isEmpty()) {
          sb.append(" ");
          sb.append(Lang.localize("gui.mjReader.noOutputs"));
          sb.append(".\n");
        } else {
          sb.append(" ");
          sb.append(Lang.localize("gui.mjReader.insertedInto"));
          sb.append("\n");
          for (String str : targets) {
            sb.append("  - ");
            sb.append(str);
            sb.append(" ");
            sb.append("\n");
          }
        }
      }
      if(mode.acceptsOutput()) {
        color = "\u00A79 ";
        sb.append(color);

        List<String> targets = icn.getInputSourcesFor(conduit, dir, input);
        if(targets.isEmpty()) {
          if(input == null) {
            sb.append(Lang.localize("gui.mjReader.noItems"));
          } else {
            sb.append(Lang.localize("gui.mjReader.noItem"));
            sb.append(" ");
            sb.append(input.getDisplayName());
          }
        } else {
          if(input == null) {
            sb.append(Lang.localize("gui.mjReader.receiveItems"));
          } else {
            sb.append(Lang.localize("gui.mjReader.receiveItem1"));
            sb.append(" ");
            sb.append(input.getDisplayName());
            sb.append(" ");
            sb.append(Lang.localize("gui.mjReader.receiveItem2"));
          }
          sb.append("\n");
          for (String str : targets) {
            sb.append("  - ");
            sb.append(str);
            sb.append("\n");
          }
        }

      }
    }
    String[] lines = sb.toString().split("\n");
    for(String line : lines) {
      player.addChatComponentMessage(new ChatComponentText(line));
    }   
  }
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChatComponentText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.