make ping module less inconsistent
All checks were successful
/ Build BaseBand (push) Successful in 2m43s

This commit is contained in:
Daniella / Tove 2024-10-05 01:37:52 +02:00
parent 4f1dfbdb1a
commit 80fd4047ce
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -10,6 +10,8 @@ import de.com.baseband.client.registry.annotation.Range;
import net.minecraft.network.play.client.CPacketKeepAlive;
import net.minecraft.network.play.server.SPacketKeepAlive;
import net.minecraft.network.Packet;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.LinkedList;
import java.util.Queue;
@ -48,6 +50,11 @@ public class Ping extends Feature {
(holderRecv.isEmpty() ? "-" : "§c" + holderRecv.size()) + "↓§7";
}
@SubscribeEvent
public void renderWorldEvent(RenderWorldLastEvent event) {
onTick();
}
@Override
public void onTick() {
while (true) {