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


Java Packet24MobSpawn类代码示例

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


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

示例1: func_72519_a

import net.minecraft.network.packet.Packet24MobSpawn; //导入依赖的package包/类
public void func_72519_a(Packet24MobSpawn p_72519_1_) {
   double var2 = (double)p_72519_1_.field_73495_c / 32.0D;
   double var4 = (double)p_72519_1_.field_73492_d / 32.0D;
   double var6 = (double)p_72519_1_.field_73493_e / 32.0D;
   float var8 = (float)(p_72519_1_.field_73500_i * 360) / 256.0F;
   float var9 = (float)(p_72519_1_.field_73497_j * 360) / 256.0F;
   EntityLivingBase var10 = (EntityLivingBase)EntityList.func_75616_a(p_72519_1_.field_73494_b, this.field_72563_h.field_71441_e);
   var10.field_70118_ct = p_72519_1_.field_73495_c;
   var10.field_70117_cu = p_72519_1_.field_73492_d;
   var10.field_70116_cv = p_72519_1_.field_73493_e;
   var10.field_70759_as = (float)(p_72519_1_.field_73498_k * 360) / 256.0F;
   Entity[] var11 = var10.func_70021_al();
   if(var11 != null) {
      int var12 = p_72519_1_.field_73496_a - var10.field_70157_k;

      for(int var13 = 0; var13 < var11.length; ++var13) {
         var11[var13].field_70157_k += var12;
      }
   }

   var10.field_70157_k = p_72519_1_.field_73496_a;
   var10.func_70080_a(var2, var4, var6, var8, var9);
   var10.field_70159_w = (double)((float)p_72519_1_.field_73490_f / 8000.0F);
   var10.field_70181_x = (double)((float)p_72519_1_.field_73491_g / 8000.0F);
   var10.field_70179_y = (double)((float)p_72519_1_.field_73499_h / 8000.0F);
   this.field_72564_i.func_73027_a(p_72519_1_.field_73496_a, var10);
   List var14 = p_72519_1_.func_73489_c();
   if(var14 != null) {
      var10.func_70096_w().func_75687_a(var14);
   }

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

示例2: handleMobSpawn

import net.minecraft.network.packet.Packet24MobSpawn; //导入依赖的package包/类
public void handleMobSpawn(Packet24MobSpawn par1Packet24MobSpawn)
{
    double d0 = (double)par1Packet24MobSpawn.xPosition / 32.0D;
    double d1 = (double)par1Packet24MobSpawn.yPosition / 32.0D;
    double d2 = (double)par1Packet24MobSpawn.zPosition / 32.0D;
    float f = (float)(par1Packet24MobSpawn.yaw * 360) / 256.0F;
    float f1 = (float)(par1Packet24MobSpawn.pitch * 360) / 256.0F;
    EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.createEntityByID(par1Packet24MobSpawn.type, this.mc.theWorld);
    entitylivingbase.serverPosX = par1Packet24MobSpawn.xPosition;
    entitylivingbase.serverPosY = par1Packet24MobSpawn.yPosition;
    entitylivingbase.serverPosZ = par1Packet24MobSpawn.zPosition;
    entitylivingbase.rotationYawHead = (float)(par1Packet24MobSpawn.headYaw * 360) / 256.0F;
    Entity[] aentity = entitylivingbase.getParts();

    if (aentity != null)
    {
        int i = par1Packet24MobSpawn.entityId - entitylivingbase.entityId;

        for (int j = 0; j < aentity.length; ++j)
        {
            aentity[j].entityId += i;
        }
    }

    entitylivingbase.entityId = par1Packet24MobSpawn.entityId;
    entitylivingbase.setPositionAndRotation(d0, d1, d2, f, f1);
    entitylivingbase.motionX = (double)((float)par1Packet24MobSpawn.velocityX / 8000.0F);
    entitylivingbase.motionY = (double)((float)par1Packet24MobSpawn.velocityY / 8000.0F);
    entitylivingbase.motionZ = (double)((float)par1Packet24MobSpawn.velocityZ / 8000.0F);
    this.worldClient.addEntityToWorld(par1Packet24MobSpawn.entityId, entitylivingbase);
    List list = par1Packet24MobSpawn.getMetadata();

    if (list != null)
    {
        entitylivingbase.getDataWatcher().updateWatchedObjectsFromList(list);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:38,代码来源:NetClientHandler.java

示例3: handleMobSpawn

import net.minecraft.network.packet.Packet24MobSpawn; //导入依赖的package包/类
@Override
public void handleMobSpawn(Packet24MobSpawn par1Packet24MobSpawn)
{
	nch.handleMobSpawn(par1Packet24MobSpawn);		
}
 
开发者ID:xurei,项目名称:forge_world_downloader,代码行数:6,代码来源:WDLNetClientHandler.java

示例4: func_73117_b

import net.minecraft.network.packet.Packet24MobSpawn; //导入依赖的package包/类
public void func_73117_b(EntityPlayerMP p_73117_1_) {
   if(p_73117_1_ != this.field_73132_a) {
      double var2 = p_73117_1_.field_70165_t - (double)(this.field_73128_d / 32);
      double var4 = p_73117_1_.field_70161_v - (double)(this.field_73126_f / 32);
      if(var2 >= (double)(-this.field_73130_b) && var2 <= (double)this.field_73130_b && var4 >= (double)(-this.field_73130_b) && var4 <= (double)this.field_73130_b) {
         if(!this.field_73134_o.contains(p_73117_1_) && (this.func_73121_d(p_73117_1_) || this.field_73132_a.field_98038_p)) {
            this.field_73134_o.add(p_73117_1_);
            Packet var6 = this.func_73124_b();
            p_73117_1_.field_71135_a.func_72567_b(var6);
            if(!this.field_73132_a.func_70096_w().func_92085_d()) {
               p_73117_1_.field_71135_a.func_72567_b(new Packet40EntityMetadata(this.field_73132_a.field_70157_k, this.field_73132_a.func_70096_w(), true));
            }

            if(this.field_73132_a instanceof EntityLivingBase) {
               ServersideAttributeMap var7 = (ServersideAttributeMap)((EntityLivingBase)this.field_73132_a).func_110140_aT();
               Collection var8 = var7.func_111160_c();
               if(!var8.isEmpty()) {
                  p_73117_1_.field_71135_a.func_72567_b(new Packet44UpdateAttributes(this.field_73132_a.field_70157_k, var8));
               }
            }

            this.field_73137_j = this.field_73132_a.field_70159_w;
            this.field_73138_k = this.field_73132_a.field_70181_x;
            this.field_73135_l = this.field_73132_a.field_70179_y;
            if(this.field_73143_t && !(var6 instanceof Packet24MobSpawn)) {
               p_73117_1_.field_71135_a.func_72567_b(new Packet28EntityVelocity(this.field_73132_a.field_70157_k, this.field_73132_a.field_70159_w, this.field_73132_a.field_70181_x, this.field_73132_a.field_70179_y));
            }

            if(this.field_73132_a.field_70154_o != null) {
               p_73117_1_.field_71135_a.func_72567_b(new Packet39AttachEntity(0, this.field_73132_a, this.field_73132_a.field_70154_o));
            }

            if(this.field_73132_a instanceof EntityLiving && ((EntityLiving)this.field_73132_a).func_110166_bE() != null) {
               p_73117_1_.field_71135_a.func_72567_b(new Packet39AttachEntity(1, this.field_73132_a, ((EntityLiving)this.field_73132_a).func_110166_bE()));
            }

            if(this.field_73132_a instanceof EntityLivingBase) {
               for(int var10 = 0; var10 < 5; ++var10) {
                  ItemStack var13 = ((EntityLivingBase)this.field_73132_a).func_71124_b(var10);
                  if(var13 != null) {
                     p_73117_1_.field_71135_a.func_72567_b(new Packet5PlayerInventory(this.field_73132_a.field_70157_k, var10, var13));
                  }
               }
            }

            if(this.field_73132_a instanceof EntityPlayer) {
               EntityPlayer var11 = (EntityPlayer)this.field_73132_a;
               if(var11.func_70608_bn()) {
                  p_73117_1_.field_71135_a.func_72567_b(new Packet17Sleep(this.field_73132_a, 0, MathHelper.func_76128_c(this.field_73132_a.field_70165_t), MathHelper.func_76128_c(this.field_73132_a.field_70163_u), MathHelper.func_76128_c(this.field_73132_a.field_70161_v)));
               }
            }

            if(this.field_73132_a instanceof EntityLivingBase) {
               EntityLivingBase var14 = (EntityLivingBase)this.field_73132_a;
               Iterator var12 = var14.func_70651_bq().iterator();

               while(var12.hasNext()) {
                  PotionEffect var9 = (PotionEffect)var12.next();
                  p_73117_1_.field_71135_a.func_72567_b(new Packet41EntityEffect(this.field_73132_a.field_70157_k, var9));
               }
            }
         }
      } else if(this.field_73134_o.contains(p_73117_1_)) {
         this.field_73134_o.remove(p_73117_1_);
         p_73117_1_.field_71130_g.add(Integer.valueOf(this.field_73132_a.field_70157_k));
      }

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

示例5: func_72519_a

import net.minecraft.network.packet.Packet24MobSpawn; //导入依赖的package包/类
public void func_72519_a(Packet24MobSpawn p_72519_1_) {
   this.func_72509_a(p_72519_1_);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:4,代码来源:NetHandler.java


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