當前位置: 首頁>>代碼示例>>Java>>正文


Java LogAgent類代碼示例

本文整理匯總了Java中net.minecraft.logging.LogAgent的典型用法代碼示例。如果您正苦於以下問題:Java LogAgent類的具體用法?Java LogAgent怎麽用?Java LogAgent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LogAgent類屬於net.minecraft.logging包,在下文中一共展示了LogAgent類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: format

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public String format(LogRecord p_format_1_) {
   StringBuilder var2 = new StringBuilder();
   var2.append(this.field_98228_b.format(Long.valueOf(p_format_1_.getMillis())));
   if(LogAgent.func_98237_a(this.field_98229_a) != null) {
      var2.append(LogAgent.func_98237_a(this.field_98229_a));
   }

   var2.append(" [").append(p_format_1_.getLevel().getName()).append("] ");
   var2.append(this.formatMessage(p_format_1_));
   var2.append('\n');
   Throwable var3 = p_format_1_.getThrown();
   if(var3 != null) {
      StringWriter var4 = new StringWriter();
      var3.printStackTrace(new PrintWriter(var4));
      var2.append(var4.toString());
   }

   return var2.toString();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:20,代碼來源:LogFormatter.java

示例2: Minecraft

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public Minecraft(Session p_i1014_1_, int p_i1014_2_, int p_i1014_3_, boolean p_i1014_4_, boolean p_i1014_5_, File p_i1014_6_, File p_i1014_7_, File p_i1014_8_, Proxy p_i1014_9_, String p_i1014_10_) {
   field_71432_P = this;
   this.field_94139_O = new LogAgent("Minecraft-Client", " [CLIENT]", (new File(p_i1014_6_, "output-client.log")).getAbsolutePath());
   this.field_71412_D = p_i1014_6_;
   this.field_110446_Y = p_i1014_7_;
   this.field_130070_K = p_i1014_8_;
   this.field_110447_Z = p_i1014_10_;
   this.field_110450_ap = new DefaultResourcePack(this.field_110446_Y);
   this.func_110435_P();
   this.field_110453_aa = p_i1014_9_;
   this.func_71389_H();
   this.field_71449_j = p_i1014_1_;
   this.field_94139_O.func_98233_a("Setting user: " + p_i1014_1_.func_111285_a());
   this.field_94139_O.func_98233_a("(Session ID is " + p_i1014_1_.func_111286_b() + ")");
   this.field_71459_aj = p_i1014_5_;
   this.field_71443_c = p_i1014_2_;
   this.field_71440_d = p_i1014_3_;
   this.field_71436_X = p_i1014_2_;
   this.field_71435_Y = p_i1014_3_;
   this.field_71431_Q = p_i1014_4_;
   ImageIO.setUseCache(false);
   StatList.func_75919_a();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:24,代碼來源:Minecraft.java

示例3: IntegratedServer

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public IntegratedServer(Minecraft p_i1317_1_, String p_i1317_2_, String p_i1317_3_, WorldSettings p_i1317_4_) {
   super(new File(p_i1317_1_.field_71412_D, "saves"));
   this.field_98130_m = new LogAgent("Minecraft-Server", " [SERVER]", (new File(p_i1317_1_.field_71412_D, "output-server.log")).getAbsolutePath());
   this.func_71224_l(p_i1317_1_.func_110432_I().func_111285_a());
   this.func_71261_m(p_i1317_2_);
   this.func_71246_n(p_i1317_3_);
   this.func_71204_b(p_i1317_1_.func_71355_q());
   this.func_71194_c(p_i1317_4_.func_77167_c());
   this.func_71191_d(256);
   this.func_71210_a(new IntegratedPlayerList(this));
   this.field_71349_l = p_i1317_1_;
   this.field_110456_c = p_i1317_1_.func_110437_J();
   this.field_71350_m = p_i1317_4_;

   try {
      this.field_71347_n = new IntegratedServerListenThread(this);
   } catch (IOException var6) {
      throw new Error();
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:21,代碼來源:IntegratedServer.java

示例4: Minecraft

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public Minecraft(Session par1Session, int par2, int par3, boolean par4, boolean par5, File par6File, File par7File, File par8File, Proxy par9Proxy, String par10Str)
{
    theMinecraft = this;
    this.mcLogAgent = new LogAgent("Minecraft-Client", " [CLIENT]", (new File(par6File, "output-client.log")).getAbsolutePath());
    this.mcDataDir = par6File;
    this.fileAssets = par7File;
    this.fileResourcepacks = par8File;
    this.launchedVersion = par10Str;
    this.mcDefaultResourcePack = new DefaultResourcePack(this.fileAssets);
    this.addDefaultResourcePack();
    this.proxy = par9Proxy;
    this.startTimerHackThread();
    this.session = par1Session;
    this.mcLogAgent.logInfo("Setting user: " + par1Session.getUsername());
    //this.mcLogAgent.logInfo("(Session ID is " + par1Session.getSessionID() + ")"); //don't print the session to the console.. that's stupid...
    this.isDemo = par5;
    this.displayWidth = par2;
    this.displayHeight = par3;
    this.tempDisplayWidth = par2;
    this.tempDisplayHeight = par3;
    this.fullscreen = par4;
    ImageIO.setUseCache(false);
    StatList.nopInit();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:25,代碼來源:Minecraft.java

示例5: IntegratedServer

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public IntegratedServer(Minecraft par1Minecraft, String par2Str, String par3Str, WorldSettings par4WorldSettings)
{
    super(new File(par1Minecraft.mcDataDir, "saves"));
    this.serverLogAgent = new LogAgent("Minecraft-Server", " [SERVER]", (new File(par1Minecraft.mcDataDir, "output-server.log")).getAbsolutePath());
    this.setServerOwner(par1Minecraft.getSession().getUsername());
    this.setFolderName(par2Str);
    this.setWorldName(par3Str);
    this.setDemo(par1Minecraft.isDemo());
    this.canCreateBonusChest(par4WorldSettings.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setConfigurationManager(new IntegratedPlayerList(this));
    this.mc = par1Minecraft;
    this.serverProxy = par1Minecraft.getProxy();
    this.theWorldSettings = par4WorldSettings;

    try
    {
        this.theServerListeningThread = new IntegratedServerListenThread(this);
    }
    catch (IOException ioexception)
    {
        throw new Error();
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:25,代碼來源:IntegratedServer.java

示例6: LogFormatter

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
private LogFormatter(LogAgent p_i1548_1_) {
   this.field_98229_a = p_i1548_1_;
   this.field_98228_b = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:5,代碼來源:LogFormatter.java

示例7: DedicatedServer

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public DedicatedServer(File p_i1508_1_) {
   super(p_i1508_1_);
   this.field_98131_l = new LogAgent("Minecraft-Server", (String)null, (new File(p_i1508_1_, "server.log")).getAbsolutePath());
   new DedicatedServerSleepThread(this);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:6,代碼來源:DedicatedServer.java

示例8: DedicatedServer

import net.minecraft.logging.LogAgent; //導入依賴的package包/類
public DedicatedServer(File par1File)
{
    super(par1File);
    this.field_98131_l = new LogAgent("Minecraft-Server", (String)null, (new File(par1File, "server.log")).getAbsolutePath());
    new DedicatedServerSleepThread(this);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:7,代碼來源:DedicatedServer.java


注:本文中的net.minecraft.logging.LogAgent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。