当前位置: 首页>>代码示例>>Java>>正文


Java ILogAgent类代码示例

本文整理汇总了Java中net.minecraft.logging.ILogAgent的典型用法代码示例。如果您正苦于以下问题:Java ILogAgent类的具体用法?Java ILogAgent怎么用?Java ILogAgent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ILogAgent类属于net.minecraft.logging包,在下文中一共展示了ILogAgent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: World

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public World(ISaveHandler p_i1953_1_, String p_i1953_2_, WorldProvider p_i1953_3_, WorldSettings p_i1953_4_, Profiler p_i1953_5_, ILogAgent p_i1953_6_) {
   this.field_72990_M = this.field_73012_v.nextInt(12000);
   this.field_72994_J = new int['\u8000'];
   this.field_73019_z = p_i1953_1_;
   this.field_72984_F = p_i1953_5_;
   this.field_72986_A = new WorldInfo(p_i1953_4_, p_i1953_2_);
   this.field_73011_w = p_i1953_3_;
   this.field_72988_C = new MapStorage(p_i1953_1_);
   this.field_98181_L = p_i1953_6_;
   VillageCollection var7 = (VillageCollection)this.field_72988_C.func_75742_a(VillageCollection.class, "villages");
   if(var7 == null) {
      this.field_72982_D = new VillageCollection(this);
      this.field_72988_C.func_75745_a("villages", this.field_72982_D);
   } else {
      this.field_72982_D = var7;
      this.field_72982_D.func_82566_a(this);
   }

   p_i1953_3_.func_76558_a(this);
   this.field_73020_y = this.func_72970_h();
   this.func_72966_v();
   this.func_72947_a();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:World.java

示例2: func_71508_a

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public boolean func_71508_a(File p_71508_1_, ILogAgent p_71508_2_) {
   if(this.field_71510_d != null) {
      return false;
   } else {
      if(p_71508_1_.getParentFile() != null) {
         p_71508_1_.getParentFile().mkdirs();
      }

      try {
         FileWriter var3 = new FileWriter(p_71508_1_);
         var3.write(this.func_71502_e());
         var3.close();
         this.field_71510_d = p_71508_1_;
         return true;
      } catch (Throwable var4) {
         p_71508_2_.func_98234_c("Could not save crash report to " + p_71508_1_, var4);
         return false;
      }
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:21,代码来源:CrashReport.java

示例3: func_111260_a

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public static void func_111260_a(BaseAttributeMap par0BaseAttributeMap, NBTTagList par1NBTTagList, ILogAgent par2ILogAgent)
{
    for (int i = 0; i < par1NBTTagList.tagCount(); ++i)
    {
        NBTTagCompound nbttagcompound = (NBTTagCompound)par1NBTTagList.tagAt(i);
        AttributeInstance attributeinstance = par0BaseAttributeMap.getAttributeInstanceByName(nbttagcompound.getString("Name"));

        if (attributeinstance != null)
        {
            func_111258_a(attributeinstance, nbttagcompound);
        }
        else if (par2ILogAgent != null)
        {
            par2ILogAgent.logWarning("Ignoring unknown attribute \'" + nbttagcompound.getString("Name") + "\'");
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:SharedMonsterAttributes.java

示例4: func_111260_a

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public static void func_111260_a(BaseAttributeMap p_111260_0_, NBTTagList p_111260_1_, ILogAgent p_111260_2_) {
   for(int var3 = 0; var3 < p_111260_1_.func_74745_c(); ++var3) {
      NBTTagCompound var4 = (NBTTagCompound)p_111260_1_.func_74743_b(var3);
      AttributeInstance var5 = p_111260_0_.func_111152_a(var4.func_74779_i("Name"));
      if(var5 != null) {
         func_111258_a(var5, var4);
      } else if(p_111260_2_ != null) {
         p_111260_2_.func_98236_b("Ignoring unknown attribute \'" + var4.func_74779_i("Name") + "\'");
      }
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:13,代码来源:SharedMonsterAttributes.java

示例5: TcpConnection

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public TcpConnection(ILogAgent p_i1398_1_, Socket p_i1398_2_, String p_i1398_3_, NetHandler p_i1398_4_, PrivateKey p_i1398_5_) throws IOException {
   this.field_74478_h = new Object();
   this.field_74475_m = true;
   this.field_74473_o = new ConcurrentLinkedQueue();
   this.field_74487_p = Collections.synchronizedList(new ArrayList());
   this.field_74486_q = Collections.synchronizedList(new ArrayList());
   this.field_74481_v = "";
   this.field_74464_B = 50;
   this.field_74463_A = p_i1398_5_;
   this.field_74479_i = p_i1398_2_;
   this.field_98215_i = p_i1398_1_;
   this.field_74476_j = p_i1398_2_.getRemoteSocketAddress();
   this.field_74485_r = p_i1398_4_;

   try {
      p_i1398_2_.setSoTimeout(30000);
      p_i1398_2_.setTrafficClass(24);
   } catch (SocketException var7) {
      System.err.println(var7.getMessage());
   }

   this.field_74477_k = new DataInputStream(p_i1398_2_.getInputStream());
   this.field_74474_l = new DataOutputStream(new BufferedOutputStream(p_i1398_2_.getOutputStream(), 5120));
   this.field_74482_u = new TcpReaderThread(this, p_i1398_3_ + " read thread");
   this.field_74483_t = new TcpWriterThread(this, p_i1398_3_ + " write thread");
   this.field_74482_u.start();
   this.field_74483_t.start();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:29,代码来源:TcpConnection.java

示例6: func_73269_d

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public static Packet func_73269_d(ILogAgent p_73269_0_, int p_73269_1_) {
   try {
      Class var2 = (Class)field_73294_l.func_76041_a(p_73269_1_);
      return var2 == null?null:(Packet)var2.newInstance();
   } catch (Exception var3) {
      var3.printStackTrace();
      p_73269_0_.func_98232_c("Skipping packet with id " + p_73269_1_);
      return null;
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:11,代码来源:Packet.java

示例7: func_73272_a

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public static Packet func_73272_a(ILogAgent p_73272_0_, DataInput p_73272_1_, boolean p_73272_2_, Socket p_73272_3_) throws IOException {
   boolean var4 = false;
   Packet var5 = null;
   int var6 = p_73272_3_.getSoTimeout();

   int var9;
   try {
      var9 = p_73272_1_.readUnsignedByte();
      if(p_73272_2_ && !field_73288_c.contains(Integer.valueOf(var9)) || !p_73272_2_ && !field_73286_b.contains(Integer.valueOf(var9))) {
         throw new IOException("Bad packet id " + var9);
      }

      var5 = func_73269_d(p_73272_0_, var9);
      if(var5 == null) {
         throw new IOException("Bad packet id " + var9);
      }

      var5.field_98193_m = p_73272_0_;
      if(var5 instanceof Packet254ServerPing) {
         p_73272_3_.setSoTimeout(1500);
      }

      var5.func_73267_a(p_73272_1_);
      ++field_73292_n;
      field_73293_o += (long)var5.func_73284_a();
   } catch (EOFException var8) {
      p_73272_0_.func_98232_c("Reached end of stream for " + p_73272_3_.getInetAddress());
      return null;
   }

   PacketCount.func_76118_a(var9, (long)var5.func_73284_a());
   ++field_73292_n;
   field_73293_o += (long)var5.func_73284_a();
   p_73272_3_.setSoTimeout(var6);
   return var5;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:37,代码来源:Packet.java

示例8: WorldClient

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public WorldClient(NetClientHandler p_i1188_1_, WorldSettings p_i1188_2_, int p_i1188_3_, int p_i1188_4_, Profiler p_i1188_5_, ILogAgent p_i1188_6_) {
   super(new SaveHandlerMP(), "MpServer", WorldProvider.func_76570_a(p_i1188_3_), p_i1188_2_, p_i1188_5_, p_i1188_6_);
   this.field_73035_a = p_i1188_1_;
   this.field_73013_u = p_i1188_4_;
   this.func_72950_A(8, 64, 8);
   this.field_72988_C = p_i1188_1_.field_72558_b;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:WorldClient.java

示例9: PropertyManager

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public PropertyManager(File p_i1502_1_, ILogAgent p_i1502_2_) {
   this.field_73673_c = p_i1502_1_;
   this.field_73674_a = p_i1502_2_;
   if(p_i1502_1_.exists()) {
      FileInputStream var3 = null;

      try {
         var3 = new FileInputStream(p_i1502_1_);
         this.field_73672_b.load(var3);
      } catch (Exception var13) {
         p_i1502_2_.func_98235_b("Failed to load " + p_i1502_1_, var13);
         this.func_73666_a();
      } finally {
         if(var3 != null) {
            try {
               var3.close();
            } catch (IOException var12) {
               ;
            }
         }

      }
   } else {
      p_i1502_2_.func_98236_b(p_i1502_1_ + " does not exist");
      this.func_73666_a();
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:29,代码来源:PropertyManager.java

示例10: WorldServerMulti

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public WorldServerMulti(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, WorldServer par6WorldServer, Profiler par7Profiler, ILogAgent par8ILogAgent)
{
    super(par1MinecraftServer, par2ISaveHandler, par3Str, par4, par5WorldSettings, par7Profiler, par8ILogAgent);
    this.mapStorage = par6WorldServer.mapStorage;
    this.worldScoreboard = par6WorldServer.getScoreboard();
    this.worldInfo = new DerivedWorldInfo(par6WorldServer.getWorldInfo());
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:WorldServerMulti.java

示例11: World

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public World(ISaveHandler par1ISaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler, ILogAgent par6ILogAgent)
{
    this.ambientTickCountdown = this.rand.nextInt(12000);
    this.lightUpdateBlockList = new int[32768];
    this.saveHandler = par1ISaveHandler;
    this.theProfiler = par5Profiler;
    this.worldInfo = new WorldInfo(par4WorldSettings, par2Str);
    this.provider = par3WorldProvider;
    perWorldStorage = new MapStorage((ISaveHandler)null);
    this.worldLogAgent = par6ILogAgent;

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:14,代码来源:World.java

示例12: TcpConnection

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public TcpConnection(ILogAgent par1ILogAgent, Socket par2Socket, String par3Str, NetHandler par4NetHandler, PrivateKey par5PrivateKey) throws IOException
{
    this.sendQueueLock = new Object();
    this.isRunning = true;
    this.readPackets = new ConcurrentLinkedQueue();
    this.dataPackets = Collections.synchronizedList(new ArrayList());
    this.chunkDataPackets = Collections.synchronizedList(new ArrayList());
    this.terminationReason = "";
    this.chunkDataPacketsDelay = 50;
    this.field_74463_A = par5PrivateKey;
    this.networkSocket = par2Socket;
    this.tcpConLogAgent = par1ILogAgent;
    this.remoteSocketAddress = par2Socket.getRemoteSocketAddress();
    this.theNetHandler = par4NetHandler;

    try
    {
        par2Socket.setSoTimeout(30000);
        par2Socket.setTrafficClass(24);
    }
    catch (SocketException socketexception)
    {
        System.err.println(socketexception.getMessage());
    }

    this.socketInputStream = new DataInputStream(par2Socket.getInputStream());
    this.socketOutputStream = new DataOutputStream(new BufferedOutputStream(par2Socket.getOutputStream(), 5120));
    this.readThread = new TcpReaderThread(this, par3Str + " read thread");
    this.writeThread = new TcpWriterThread(this, par3Str + " write thread");
    this.readThread.start();
    this.writeThread.start();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:33,代码来源:TcpConnection.java

示例13: getNewPacket

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
/**
 * Returns a new instance of the specified Packet class.
 */
public static Packet getNewPacket(ILogAgent par0ILogAgent, int par1)
{
    try
    {
        Class oclass = (Class)packetIdToClassMap.lookup(par1);
        return oclass == null ? null : (Packet)oclass.newInstance();
    }
    catch (Exception exception)
    {
        exception.printStackTrace();
        par0ILogAgent.logSevere("Skipping packet with id " + par1);
        return null;
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:Packet.java

示例14: WorldClient

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public WorldClient(NetClientHandler par1NetClientHandler, WorldSettings par2WorldSettings, int par3, int par4, Profiler par5Profiler, ILogAgent par6ILogAgent)
{
    super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler, par6ILogAgent);
    this.sendQueue = par1NetClientHandler;
    this.difficultySetting = par4;
    this.mapStorage = par1NetClientHandler.mapStorage;
    this.isRemote = true;
    finishSetup();
    this.setSpawnLocation(8, 64, 8);
    MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(this));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:WorldClient.java

示例15: PropertyManager

import net.minecraft.logging.ILogAgent; //导入依赖的package包/类
public PropertyManager(File par1File, ILogAgent par2ILogAgent)
{
    this.associatedFile = par1File;
    this.logger = par2ILogAgent;

    if (par1File.exists())
    {
        FileInputStream fileinputstream = null;

        try
        {
            fileinputstream = new FileInputStream(par1File);
            this.properties.load(fileinputstream);
        }
        catch (Exception exception)
        {
            par2ILogAgent.logWarningException("Failed to load " + par1File, exception);
            this.logMessageAndSave();
        }
        finally
        {
            if (fileinputstream != null)
            {
                try
                {
                    fileinputstream.close();
                }
                catch (IOException ioexception)
                {
                    ;
                }
            }
        }
    }
    else
    {
        par2ILogAgent.logWarning(par1File + " does not exist");
        this.logMessageAndSave();
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:41,代码来源:PropertyManager.java


注:本文中的net.minecraft.logging.ILogAgent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。