public void func_72570_d() { this.field_72584_h = false; ++this.field_72571_f; this.field_72573_d.field_71304_b.func_76320_a("packetflow"); this.field_72575_b.func_74428_b(); this.field_72573_d.field_71304_b.func_76318_c("keepAlive"); if((long)this.field_72571_f - this.field_72580_l > 20L) { this.field_72580_l = (long)this.field_72571_f; this.field_72582_j = System.nanoTime() / 1000000L; this.field_72585_i = field_72583_k.nextInt(); this.func_72567_b(new Packet0KeepAlive(this.field_72585_i)); } if(this.field_72581_m > 0) { --this.field_72581_m; } if(this.field_72578_n > 0) { --this.field_72578_n; } this.field_72573_d.field_71304_b.func_76318_c("playerTick"); this.field_72573_d.field_71304_b.func_76319_b(); }
public void func_72477_a(Packet0KeepAlive p_72477_1_) { if(p_72477_1_.field_73592_a == this.field_72585_i) { int var2 = (int)(System.nanoTime() / 1000000L - this.field_72582_j); this.field_72574_e.field_71138_i = (this.field_72574_e.field_71138_i * 3 + var2) / 4; } }
public void func_73876_c() { ++this.field_74260_b; if(this.field_74260_b % 20 == 0) { this.field_74261_a.func_72552_c(new Packet0KeepAlive()); } if(this.field_74261_a != null) { this.field_74261_a.func_72551_d(); } }
/** * run once each game tick */ public void networkTick() { this.field_72584_h = false; ++this.currentTicks; this.mcServer.theProfiler.startSection("packetflow"); this.netManager.processReadPackets(); this.mcServer.theProfiler.endStartSection("keepAlive"); if ((long)this.currentTicks - this.ticksOfLastKeepAlive > 20L) { this.ticksOfLastKeepAlive = (long)this.currentTicks; this.keepAliveTimeSent = System.nanoTime() / 1000000L; this.keepAliveRandomID = randomGenerator.nextInt(); this.sendPacketToPlayer(new Packet0KeepAlive(this.keepAliveRandomID)); } if (this.chatSpamThresholdCount > 0) { --this.chatSpamThresholdCount; } if (this.creativeItemCreationSpamThresholdTally > 0) { --this.creativeItemCreationSpamThresholdTally; } this.mcServer.theProfiler.endStartSection("playerTick"); this.mcServer.theProfiler.endSection(); }
/** * Handle a keep alive packet. */ public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) { if (par1Packet0KeepAlive.randomId == this.keepAliveRandomID) { int i = (int)(System.nanoTime() / 1000000L - this.keepAliveTimeSent); this.playerEntity.ping = (this.playerEntity.ping * 3 + i) / 4; } }
/** * Called from the main game loop to update the screen. */ public void updateScreen() { ++this.updateCounter; if (this.updateCounter % 20 == 0) { this.netHandler.addToSendQueue(new Packet0KeepAlive()); } if (this.netHandler != null) { this.netHandler.processReadPackets(); } }
@Override public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) { nch.handleKeepAlive(par1Packet0KeepAlive); }
public void func_72477_a(Packet0KeepAlive p_72477_1_) { this.func_72509_a(p_72477_1_); }
public void func_72477_a(Packet0KeepAlive p_72477_1_) { this.func_72552_c(new Packet0KeepAlive(p_72477_1_.field_73592_a)); }
/** * Handle a keep alive packet. */ public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) { this.addToSendQueue(new Packet0KeepAlive(par1Packet0KeepAlive.randomId)); }