Example #1
0
  public List func_180506_a(ICommandSender p_180506_1_, String p_180506_2_, BlockPos p_180506_3_) {
    ArrayList var4 = Lists.newArrayList();

    if (p_180506_2_.startsWith("/")) {
      p_180506_2_ = p_180506_2_.substring(1);
      boolean var11 = !p_180506_2_.contains(" ");
      List var12 =
          this.commandManager.getTabCompletionOptions(p_180506_1_, p_180506_2_, p_180506_3_);

      if (var12 != null) {
        Iterator var13 = var12.iterator();

        while (var13.hasNext()) {
          String var14 = (String) var13.next();

          if (var11) {
            var4.add("/" + var14);
          } else {
            var4.add(var14);
          }
        }
      }

      return var4;
    } else {
      String[] var5 = p_180506_2_.split(" ", -1);
      String var6 = var5[var5.length - 1];
      String[] var7 = this.serverConfigManager.getAllUsernames();
      int var8 = var7.length;

      for (int var9 = 0; var9 < var8; ++var9) {
        String var10 = var7[var9];

        if (CommandBase.doesStringStartWith(var6, var10)) {
          var4.add(var10);
        }
      }

      return var4;
    }
  }
 public List getLiquidTooltip(FluidStack liquid, boolean par2) {
   ArrayList list = new ArrayList();
   if (liquid.fluidID == -37) {
     list.add("\u00A7fFuel");
     list.add("mB: " + liquid.amount);
   } else {
     String name = StatCollector.translateToLocal(FluidRegistry.getFluidName(liquid));
     list.add("\u00A7f" + name);
     if (name.equals("liquified emerald")) {
       list.add("Emeralds: " + liquid.amount / 320f);
     } else if (name.contains("Molten")) {
       int ingots = liquid.amount / TConstruct.ingotLiquidValue;
       if (ingots > 0) list.add("Ingots: " + ingots);
       int mB = liquid.amount % TConstruct.ingotLiquidValue;
       if (mB > 0) {
         int nuggets = mB / TConstruct.nuggetLiquidValue;
         int junk = (mB % TConstruct.nuggetLiquidValue);
         if (nuggets > 0) list.add("Nuggets: " + nuggets);
         if (junk > 0) list.add("mB: " + junk);
       }
     } else if (name.equals("Seared Stone")) {
       int ingots = liquid.amount / TConstruct.ingotLiquidValue;
       if (ingots > 0) list.add("Blocks: " + ingots);
       int mB = liquid.amount % TConstruct.ingotLiquidValue;
       if (mB > 0) list.add("mB: " + mB);
     } else if (name.equals("Molten Glass")) {
       int blocks = liquid.amount / 1000;
       if (blocks > 0) list.add("Blocks: " + blocks);
       int panels = (liquid.amount % 1000) / 250;
       if (panels > 0) list.add("Panels: " + panels);
       int mB = (liquid.amount % 1000) % 250;
       if (mB > 0) list.add("mB: " + mB);
     } else {
       list.add("mB: " + liquid.amount);
     }
   }
   return list;
 }