Java 类net.minecraft.client.particle.EntityPickupFX 实例源码

项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getCollectedItemEntityID());
    EntityLivingBase entitylivingbase = (EntityLivingBase)this.clientWorldController.getEntityByID(packetIn.getEntityID());

    if (entitylivingbase == null)
    {
        entitylivingbase = this.gameController.thePlayer;
    }

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

        this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.clientWorldController, entity, entitylivingbase, 0.5F));
        this.clientWorldController.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getCollectedItemEntityID());
    EntityLivingBase entitylivingbase = (EntityLivingBase)this.clientWorldController.getEntityByID(packetIn.getEntityID());

    if (entitylivingbase == null)
    {
        entitylivingbase = this.gameController.thePlayer;
    }

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

        this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.clientWorldController, entity, entitylivingbase, 0.5F));
        this.clientWorldController.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getCollectedItemEntityID());
    EntityLivingBase entitylivingbase = (EntityLivingBase) this.clientWorldController
            .getEntityByID(packetIn.getEntityID());

    if (entitylivingbase == null) {
        entitylivingbase = this.gameController.thePlayer;
    }

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

        this.gameController.effectRenderer
                .addEffect(new EntityPickupFX(this.clientWorldController, entity, entitylivingbase, 0.5F));
        this.clientWorldController.removeEntityFromWorld(packetIn.getCollectedItemEntityID());
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem p_147246_1_)
{
    Entity var2 = this.clientWorldController.getEntityByID(p_147246_1_.func_149354_c());
    Object var3 = (EntityLivingBase)this.clientWorldController.getEntityByID(p_147246_1_.func_149353_d());

    if (var3 == null)
    {
        var3 = this.gameController.thePlayer;
    }

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

        this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.gameController.theWorld, var2, (Entity)var3, -0.5F));
        this.clientWorldController.removeEntityFromWorld(p_147246_1_.func_149354_c());
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem p_147246_1_)
{
    Entity entity = this.clientWorldController.getEntityByID(p_147246_1_.func_149354_c());
    Object object = (EntityLivingBase)this.clientWorldController.getEntityByID(p_147246_1_.func_149353_d());

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

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

        this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.gameController.theWorld, entity, (Entity)object, -0.5F));
        this.clientWorldController.removeEntityFromWorld(p_147246_1_.func_149354_c());
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleCollectItem(S0DPacketCollectItem p_147246_1_)
{
    Entity entity = this.clientWorldController.getEntityByID(p_147246_1_.func_149354_c());
    Object object = (EntityLivingBase)this.clientWorldController.getEntityByID(p_147246_1_.func_149353_d());

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

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

        this.gameController.effectRenderer.addEffect(new EntityPickupFX(this.gameController.theWorld, entity, (Entity)object, -0.5F));
        this.clientWorldController.removeEntityFromWorld(p_147246_1_.func_149354_c());
    }
}
项目:RuneCraftery    文件:NetClientHandler.java   
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);
   }

}
项目:RuneCraftery    文件:NetClientHandler.java   
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);
    }
}
项目:BetterNutritionMod    文件:NetClientHandler.java   
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);
    }
}
项目:Resilience-Client-Source    文件:EntityPlayerSP.java   
/**
 * Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
 */
public void onItemPickup(Entity par1Entity, int par2)
{
    this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, par1Entity, this, -0.5F));
}
项目:Cauldron    文件:EntityPlayerSP.java   
public void onItemPickup(Entity p_71001_1_, int p_71001_2_)
{
    this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, p_71001_1_, this, -0.5F));
}
项目:Cauldron    文件:EntityPlayerSP.java   
public void onItemPickup(Entity p_71001_1_, int p_71001_2_)
{
    this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, p_71001_1_, this, -0.5F));
}
项目:RuneCraftery    文件:EntityPlayerSP.java   
public void func_71001_a(Entity p_71001_1_, int p_71001_2_) {
   this.field_71159_c.field_71452_i.func_78873_a(new EntityPickupFX(this.field_71159_c.field_71441_e, p_71001_1_, this, -0.5F));
}
项目:RuneCraftery    文件:EntityPlayerSP.java   
/**
 * Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
 */
public void onItemPickup(Entity par1Entity, int par2)
{
    this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, par1Entity, this, -0.5F));
}
项目:BetterNutritionMod    文件:EntityPlayerSP.java   
/**
 * Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize
 */
public void onItemPickup(Entity par1Entity, int par2)
{
    this.mc.effectRenderer.addEffect(new EntityPickupFX(this.mc.theWorld, par1Entity, this, -0.5F));
}