/** * Called whenever an item is picked up from walking over it. Args: pickedUpEntity, stackSize */ public void onItemPickup(Entity p_71001_1_, int p_71001_2_) { if (!p_71001_1_.isDead && !this.worldObj.isRemote) { EntityTracker entitytracker = ((WorldServer)this.worldObj).getEntityTracker(); if (p_71001_1_ instanceof EntityItem) { entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } if (p_71001_1_ instanceof EntityArrow) { entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } if (p_71001_1_ instanceof EntityXPOrb) { entitytracker.sendToAllTrackingEntity(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } } }
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()); } }
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()); } }
public void onItemPickup(Entity p_71001_1_, int p_71001_2_) { ; ; ; if ((!p_71001_1_.isDead) && (!this.worldObj.isRemote)) { EntityTracker entitytracker = ((WorldServer) this.worldObj) .getEntityTracker(); if ((p_71001_1_ instanceof EntityItem)) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), getEntityId())); } if ((p_71001_1_ instanceof EntityArrow)) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), getEntityId())); } if ((p_71001_1_ instanceof EntityXPOrb)) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), getEntityId())); } } }
/** * 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.isClient) { EntityTracker var3 = ((WorldServer)this.worldObj).getEntityTracker(); if (par1Entity instanceof EntityItem) { var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId())); } if (par1Entity instanceof EntityArrow) { var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId())); } if (par1Entity instanceof EntityXPOrb) { var3.func_151247_a(par1Entity, new S0DPacketCollectItem(par1Entity.getEntityId(), this.getEntityId())); } } }
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()); } }
public void onItemPickup(Entity p_71001_1_, int p_71001_2_) { if (!p_71001_1_.isDead && !this.worldObj.isRemote) { EntityTracker entitytracker = ((WorldServer)this.worldObj).getEntityTracker(); if (p_71001_1_ instanceof EntityItem) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } if (p_71001_1_ instanceof EntityArrow) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } if (p_71001_1_ instanceof EntityXPOrb) { entitytracker.func_151247_a(p_71001_1_, new S0DPacketCollectItem(p_71001_1_.getEntityId(), this.getEntityId())); } } }
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()); } }
@Override public Packet collectItem(int entityItemID, int collectorID) { return (Packet) new S0DPacketCollectItem(entityItemID, collectorID); }
void handleCollectItem(S0DPacketCollectItem packetIn);
void handleCollectItem(S0DPacketCollectItem var1);
void handleCollectItem(S0DPacketCollectItem p_147246_1_);