content: package mod.acgaming.universaltweaks.tweaks.misc.credits.mixin;
  
  import net.minecraft.client.Minecraft;
  import net.minecraft.client.network.NetHandlerPlayClient;
  import net.minecraft.network.play.client.CPacketClientStatus;
  import net.minecraft.network.play.server.SPacketChangeGameState;
  
  import mod.acgaming.universaltweaks.UniversalTweaks;
  import mod.acgaming.universaltweaks.config.UTConfigGeneral;
  import mod.acgaming.universaltweaks.config.UTConfigTweaks;
  import org.spongepowered.asm.mixin.Mixin;
  import org.spongepowered.asm.mixin.Shadow;
  import org.spongepowered.asm.mixin.injection.At;
  import org.spongepowered.asm.mixin.injection.Inject;
  import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
  
  @Mixin(NetHandlerPlayClient.class)
  public class UTSkipCreditsMixin
  {
      @Shadow
      private Minecraft client;
  
      @Inject(method = "handleChangeGameState", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;displayGuiScreen(Lnet/minecraft/client/gui/GuiScreen;)V", ordinal = 1), cancellable = true)
      public void utSkipCredits(SPacketChangeGameState packetIn, CallbackInfo ci)
      {
          if (!UTConfigTweaks.MISC.utSkipCreditsToggle) return;
          if (UTConfigGeneral.DEBUG.utDebugToggle) UniversalTweaks.LOGGER.debug("UTSkipCredits ::: Handle change game state");
          this.client.player.connection.sendPacket(new CPacketClientStatus(CPacketClientStatus.State.PERFORM_RESPAWN));
          ci.cancel();
      }
  }