Add more fishing debug stats. (waiting on admins lol)

This commit is contained in:
nea
2023-07-30 20:00:38 +02:00
parent b9a22305dc
commit dbc56fb352
3 changed files with 97 additions and 29 deletions

View File

@@ -22,6 +22,7 @@ import moe.nea.firmament.events.OutgoingPacketEvent;
import moe.nea.firmament.events.ParticleSpawnEvent;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.EntityPositionS2CPacket;
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.asm.mixin.Mixin;
@@ -41,6 +42,11 @@ public class MixinClientPacketHandler {
));
}
@Inject(method = "onEntityPosition", at = @At(value = "TAIL"))
public void onEntityPosition(EntityPositionS2CPacket packet, CallbackInfo ci) {
System.out.printf("Got position update for %d", packet.getId());
}
@Inject(method = "sendPacket(Lnet/minecraft/network/packet/Packet;)V", at = @At("HEAD"), cancellable = true)
public void onSendPacket(Packet<?> packet, CallbackInfo ci) {
if (OutgoingPacketEvent.Companion.publish(new OutgoingPacketEvent(packet)).getCancelled()) {