当前位置: 首页>>代码示例>>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;未经允许,请勿转载。