/** * Updates a players' ping statistics */ public void processKeepAlive(C00PacketKeepAlive packetIn) { if (packetIn.getKey() == this.field_147378_h) { int i = (int)(this.currentTimeMillis() - this.lastPingTime); this.playerEntity.ping = (this.playerEntity.ping * 3 + i) / 4; } }
/** * Called from the main game loop to update the screen. */ public void updateScreen() { ++this.progress; if (this.progress % 20 == 0) { this.netHandlerPlayClient.addToSendQueue(new C00PacketKeepAlive()); } }
public PingSpoof() { super("Ping Spoof", 0x95FFFC, ModuleCategory.MISCELLANEOUS); setHidden(true); listeners.add(new Listener<SendPacket>() { @Override public void call(SendPacket event) { if (event.getPacket() instanceof C00PacketKeepAlive) event.setCancelled(true); } }); }
public boolean queueUnwrappedPacket(EntityPlayer player, Object packetObj) { if (packetObj == null) return true; if (player == null) { if (packetObj instanceof C00PacketKeepAlive || packetObj instanceof S00PacketKeepAlive) { NORELEASE.fixme("Shouldn't this, like, not happen?"); return true; } NORELEASE.println("No player to handle: " + packetObj + " " + packetObj.getClass().getSimpleName()); return true; } if (player.worldObj.isRemote) return false; Packet packet = (Packet) packetObj; // May possibly need to inject the liason into things up higher, during reading. Somehow. Hopefulloy won't be needed. InteractionLiason liason = InteractionLiason.activeLiasons.get(player); if (liason == null) { if (!(packet instanceof C00PacketKeepAlive)) { // Seems our system isn't perfect. :/ // Keepalives are generated from a different thread I guess. Hammer.logWarning("Liasonless wrapped packet: " + packet.getClass().getSimpleName() + " " + packet.toString()); } return true; } NetHandlerPlayServer handler = liason.playerNetServerHandler; if (packet instanceof FMLProxyPacket) { FMLProxyPacket fml = (FMLProxyPacket) packet; NetworkDispatcher dispatcher = handler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get(); fml.setTarget(Side.CLIENT); fml.setDispatcher(dispatcher); if (fml.payload().readerIndex() != 0) { Core.logSevere("Packet double-processing detected! Channel: " + fml.channel()); return true; } } packet.processPacket(handler); return true; }
/** * Updates a players' ping statistics */ public void processKeepAlive(C00PacketKeepAlive p_147353_1_) { if (p_147353_1_.func_149460_c() == this.field_147378_h) { int var2 = (int)(this.func_147363_d() - this.field_147379_i); this.playerEntity.ping = (this.playerEntity.ping * 3 + var2) / 4; } }
/** * Called from the main game loop to update the screen. */ public void updateScreen() { ++this.field_146593_f; if (this.field_146593_f % 20 == 0) { this.field_146594_a.addToSendQueue(new C00PacketKeepAlive()); } if (this.field_146594_a != null) { this.field_146594_a.onNetworkTick(); } }
public void processKeepAlive(C00PacketKeepAlive p_147353_1_) { if (p_147353_1_.func_149460_c() == this.field_147378_h) { int i = (int)(this.func_147363_d() - this.field_147379_i); this.playerEntity.ping = (this.playerEntity.ping * 3 + i) / 4; } }
public void updateScreen() { ++this.field_146593_f; if (this.field_146593_f % 20 == 0) { this.field_146594_a.addToSendQueue(new C00PacketKeepAlive()); } if (this.field_146594_a != null) { this.field_146594_a.onNetworkTick(); } }
public void handleKeepAlive(S00PacketKeepAlive packetIn) { this.addToSendQueue(new C00PacketKeepAlive(packetIn.func_149134_c())); }
public void handleKeepAlive(S00PacketKeepAlive p_147272_1_) { this.addToSendQueue(new C00PacketKeepAlive(p_147272_1_.func_149134_c())); }
@Override public void processKeepAlive(C00PacketKeepAlive p_147353_1_) { }
/** * Updates a players' ping statistics */ void processKeepAlive(C00PacketKeepAlive packetIn);
/** * Updates a players' ping statistics */ void processKeepAlive(C00PacketKeepAlive var1);
void processKeepAlive(C00PacketKeepAlive p_147353_1_);