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


Java Packet22Collect類代碼示例

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


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

示例1: func_71001_a

import net.minecraft.network.packet.Packet22Collect; //導入依賴的package包/類
public void func_71001_a(Entity p_71001_1_, int p_71001_2_) {
   if(!p_71001_1_.field_70128_L && !this.field_70170_p.field_72995_K) {
      EntityTracker var3 = ((WorldServer)this.field_70170_p).func_73039_n();
      if(p_71001_1_ instanceof EntityItem) {
         var3.func_72784_a(p_71001_1_, new Packet22Collect(p_71001_1_.field_70157_k, this.field_70157_k));
      }

      if(p_71001_1_ instanceof EntityArrow) {
         var3.func_72784_a(p_71001_1_, new Packet22Collect(p_71001_1_.field_70157_k, this.field_70157_k));
      }

      if(p_71001_1_ instanceof EntityXPOrb) {
         var3.func_72784_a(p_71001_1_, new Packet22Collect(p_71001_1_.field_70157_k, this.field_70157_k));
      }
   }

}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:18,代碼來源:EntityLivingBase.java

示例2: func_72475_a

import net.minecraft.network.packet.Packet22Collect; //導入依賴的package包/類
public void func_72475_a(Packet22Collect p_72475_1_) {
   Entity var2 = this.func_72545_a(p_72475_1_.field_73313_a);
   Object var3 = (EntityLivingBase)this.func_72545_a(p_72475_1_.field_73312_b);
   if(var3 == null) {
      var3 = this.field_72563_h.field_71439_g;
   }

   if(var2 != null) {
      if(var2 instanceof EntityXPOrb) {
         this.field_72564_i.func_72956_a(var2, "random.orb", 0.2F, ((this.field_72557_e.nextFloat() - this.field_72557_e.nextFloat()) * 0.7F + 1.0F) * 2.0F);
      } else {
         this.field_72564_i.func_72956_a(var2, "random.pop", 0.2F, ((this.field_72557_e.nextFloat() - this.field_72557_e.nextFloat()) * 0.7F + 1.0F) * 2.0F);
      }

      this.field_72563_h.field_71452_i.func_78873_a(new EntityPickupFX(this.field_72563_h.field_71441_e, var2, (Entity)var3, -0.5F));
      this.field_72564_i.func_73028_b(p_72475_1_.field_73313_a);
   }

}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:20,代碼來源:NetClientHandler.java

示例3: onItemPickup

import net.minecraft.network.packet.Packet22Collect; //導入依賴的package包/類
/**
 * Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
 */
public void onItemPickup(Entity par1Entity, int par2)
{
    if (!par1Entity.isDead && !this.worldObj.isRemote)
    {
        EntityTracker entitytracker = ((WorldServer)this.worldObj).getEntityTracker();

        if (par1Entity instanceof EntityItem)
        {
            entitytracker.sendPacketToAllPlayersTrackingEntity(par1Entity, new Packet22Collect(par1Entity.entityId, this.entityId));
        }

        if (par1Entity instanceof EntityArrow)
        {
            entitytracker.sendPacketToAllPlayersTrackingEntity(par1Entity, new Packet22Collect(par1Entity.entityId, this.entityId));
        }

        if (par1Entity instanceof EntityXPOrb)
        {
            entitytracker.sendPacketToAllPlayersTrackingEntity(par1Entity, new Packet22Collect(par1Entity.entityId, this.entityId));
        }
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:26,代碼來源:EntityLivingBase.java

示例4: handleCollect

import net.minecraft.network.packet.Packet22Collect; //導入依賴的package包/類
public void handleCollect(Packet22Collect par1Packet22Collect)
{
    Entity entity = this.getEntityByID(par1Packet22Collect.collectedEntityId);
    Object object = (EntityLivingBase)this.getEntityByID(par1Packet22Collect.collectorEntityId);

    if (object == null)
    {
        object = this.mc.thePlayer;
    }

    if (entity != null)
    {
        if (entity instanceof EntityXPOrb)
        {
            this.worldClient.playSoundAtEntity(entity, "random.orb", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
        }
        else
        {
            this.worldClient.playSoundAtEntity(entity, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
        }

        this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, entity, (Entity)object, -0.5F));
        this.worldClient.removeEntityFromWorld(par1Packet22Collect.collectedEntityId);
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:26,代碼來源:NetClientHandler.java

示例5: handleCollect

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

示例6: func_72475_a

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


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