public void handleDestroyEntity(Packet29DestroyEntity par1Packet29DestroyEntity) { for (int i = 0; i < par1Packet29DestroyEntity.entityId.length; ++i) { this.worldClient.removeEntityFromWorld(par1Packet29DestroyEntity.entityId[i]); } }
@Override public void handleDestroyEntity(Packet29DestroyEntity par1Packet29DestroyEntity) { nch.handleDestroyEntity(par1Packet29DestroyEntity); }
public void func_70071_h_() { this.field_71134_c.func_73075_a(); --this.field_71145_cl; this.field_71070_bA.func_75142_b(); if(!this.field_70170_p.field_72995_K && !this.field_71070_bA.func_75145_c(this)) { this.func_71053_j(); this.field_71070_bA = this.field_71069_bz; } while(!this.field_71130_g.isEmpty()) { int var1 = Math.min(this.field_71130_g.size(), 127); int[] var2 = new int[var1]; Iterator var3 = this.field_71130_g.iterator(); int var4 = 0; while(var3.hasNext() && var4 < var1) { var2[var4++] = ((Integer)var3.next()).intValue(); var3.remove(); } this.field_71135_a.func_72567_b(new Packet29DestroyEntity(var2)); } if(!this.field_71129_f.isEmpty()) { ArrayList var6 = new ArrayList(); Iterator var7 = this.field_71129_f.iterator(); ArrayList var8 = new ArrayList(); while(var7.hasNext() && var6.size() < 5) { ChunkCoordIntPair var9 = (ChunkCoordIntPair)var7.next(); var7.remove(); if(var9 != null && this.field_70170_p.func_72899_e(var9.field_77276_a << 4, 0, var9.field_77275_b << 4)) { var6.add(this.field_70170_p.func_72964_e(var9.field_77276_a, var9.field_77275_b)); var8.addAll(((WorldServer)this.field_70170_p).func_73049_a(var9.field_77276_a * 16, 0, var9.field_77275_b * 16, var9.field_77276_a * 16 + 16, 256, var9.field_77275_b * 16 + 16)); } } if(!var6.isEmpty()) { this.field_71135_a.func_72567_b(new Packet56MapChunks(var6)); Iterator var11 = var8.iterator(); while(var11.hasNext()) { TileEntity var5 = (TileEntity)var11.next(); this.func_71119_a(var5); } var11 = var6.iterator(); while(var11.hasNext()) { Chunk var10 = (Chunk)var11.next(); this.func_71121_q().func_73039_n().func_85172_a(this, var10); } } } if(this.field_143005_bX > 0L && this.field_71133_b.func_143007_ar() > 0 && MinecraftServer.func_130071_aq() - this.field_143005_bX > (long)(this.field_71133_b.func_143007_ar() * 1000 * 60)) { this.field_71135_a.func_72565_c("You have been idle for too long!"); } }
public void func_72491_a(Packet29DestroyEntity p_72491_1_) { this.func_72509_a(p_72491_1_); }
public void func_72491_a(Packet29DestroyEntity p_72491_1_) { for(int var2 = 0; var2 < p_72491_1_.field_73368_a.length; ++var2) { this.field_72564_i.func_73028_b(p_72491_1_.field_73368_a[var2]); } }
/** * Called to update the entity's position/logic. */ public void onUpdate() { this.theItemInWorldManager.updateBlockRemoving(); --this.initialInvulnerability; this.openContainer.detectAndSendChanges(); if (!this.worldObj.isRemote && !ForgeHooks.canInteractWith(this, this.openContainer)) { this.closeScreen(); this.openContainer = this.inventoryContainer; } while (!this.destroyedItemsNetCache.isEmpty()) { int i = Math.min(this.destroyedItemsNetCache.size(), 127); int[] aint = new int[i]; Iterator iterator = this.destroyedItemsNetCache.iterator(); int j = 0; while (iterator.hasNext() && j < i) { aint[j++] = ((Integer)iterator.next()).intValue(); iterator.remove(); } this.playerNetServerHandler.sendPacketToPlayer(new Packet29DestroyEntity(aint)); } if (!this.loadedChunks.isEmpty()) { ArrayList arraylist = new ArrayList(); Iterator iterator1 = this.loadedChunks.iterator(); ArrayList arraylist1 = new ArrayList(); while (iterator1.hasNext() && arraylist.size() < 5) { ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair)iterator1.next(); iterator1.remove(); if (chunkcoordintpair != null && this.worldObj.blockExists(chunkcoordintpair.chunkXPos << 4, 0, chunkcoordintpair.chunkZPos << 4)) { arraylist.add(this.worldObj.getChunkFromChunkCoords(chunkcoordintpair.chunkXPos, chunkcoordintpair.chunkZPos)); //BugFix: 16 makes it load an extra chunk, which isn't associated with a player, which makes it not unload unless a player walks near it. //ToDo: Find a way to efficiently clean abandoned chunks. //arraylist1.addAll(((WorldServer)this.worldObj).getAllTileEntityInBox(chunkcoordintpair.chunkXPos * 16, 0, chunkcoordintpair.chunkZPos * 16, chunkcoordintpair.chunkXPos * 16 + 16, 256, chunkcoordintpair.chunkZPos * 16 + 16)); arraylist1.addAll(((WorldServer)this.worldObj).getAllTileEntityInBox(chunkcoordintpair.chunkXPos * 16, 0, chunkcoordintpair.chunkZPos * 16, chunkcoordintpair.chunkXPos * 16 + 15, 256, chunkcoordintpair.chunkZPos * 16 + 15)); } } if (!arraylist.isEmpty()) { this.playerNetServerHandler.sendPacketToPlayer(new Packet56MapChunks(arraylist)); Iterator iterator2 = arraylist1.iterator(); while (iterator2.hasNext()) { TileEntity tileentity = (TileEntity)iterator2.next(); this.sendTileEntityToPlayer(tileentity); } iterator2 = arraylist.iterator(); while (iterator2.hasNext()) { Chunk chunk = (Chunk)iterator2.next(); this.getServerForPlayer().getEntityTracker().func_85172_a(this, chunk); MinecraftForge.EVENT_BUS.post(new ChunkWatchEvent.Watch(chunk.getChunkCoordIntPair(), this)); } } } if (this.field_143005_bX > 0L && this.mcServer.func_143007_ar() > 0 && MinecraftServer.getSystemTimeMillis() - this.field_143005_bX > (long)(this.mcServer.func_143007_ar() * 1000 * 60)) { this.playerNetServerHandler.kickPlayerFromServer("You have been idle for too long!"); } }