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


Java Packet28EntityVelocity類代碼示例

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


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

示例1: handleEntityVelocity

import net.minecraft.network.packet.Packet28EntityVelocity; //導入依賴的package包/類
/**
 * Packet handler
 */
public void handleEntityVelocity(Packet28EntityVelocity par1Packet28EntityVelocity)
{
    Entity entity = this.getEntityByID(par1Packet28EntityVelocity.entityId);

    if (entity != null)
    {
        entity.setVelocity((double)par1Packet28EntityVelocity.motionX / 8000.0D, (double)par1Packet28EntityVelocity.motionY / 8000.0D, (double)par1Packet28EntityVelocity.motionZ / 8000.0D);
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:13,代碼來源:NetClientHandler.java

示例2: handleEntityVelocity

import net.minecraft.network.packet.Packet28EntityVelocity; //導入依賴的package包/類
@Override
public void handleEntityVelocity(Packet28EntityVelocity par1Packet28EntityVelocity)
{
	nch.handleEntityVelocity(par1Packet28EntityVelocity);
	
}
 
開發者ID:xurei,項目名稱:forge_world_downloader,代碼行數:7,代碼來源:WDLNetClientHandler.java

示例3: func_73117_b

import net.minecraft.network.packet.Packet28EntityVelocity; //導入依賴的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

示例4: func_72520_a

import net.minecraft.network.packet.Packet28EntityVelocity; //導入依賴的package包/類
public void func_72520_a(Packet28EntityVelocity p_72520_1_) {
   this.func_72509_a(p_72520_1_);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:4,代碼來源:NetHandler.java

示例5: func_72520_a

import net.minecraft.network.packet.Packet28EntityVelocity; //導入依賴的package包/類
public void func_72520_a(Packet28EntityVelocity p_72520_1_) {
   Entity var2 = this.func_72545_a(p_72520_1_.field_73390_a);
   if(var2 != null) {
      var2.func_70016_h((double)p_72520_1_.field_73388_b / 8000.0D, (double)p_72520_1_.field_73389_c / 8000.0D, (double)p_72520_1_.field_73387_d / 8000.0D);
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:7,代碼來源:NetClientHandler.java


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