本文整理汇总了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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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();
}
}
示例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");
}
示例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);
}
示例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);
}