<commit_before>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package tk.wurst_client.features.mods;

import java.util.Random;

import net.minecraft.util.math.BlockPos;
import tk.wurst_client.ai.GoRandomAI;
import tk.wurst_client.events.listeners.UpdateListener;

@Mod.Info(name = "AntiAFK",
	description = "Walks around randomly to hide you from AFK detectors.",
	tags = "AFKBot,anti afk,afk bot",
	help = "Mods/AntiAFK")
@Mod.Bypasses(ghostMode = false)
public class AntiAfkMod extends Mod implements UpdateListener
{
	private GoRandomAI ai;
	private int timer;
	private Random random = new Random();
	
	@Override
	public void onEnable()
	{
		ai = new GoRandomAI(new BlockPos(mc.player), 16F);
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
		
		if(ai != null)
			ai.stop();
	}
	
	@Override
	public void onUpdate()
	{
		// check if player died
		if(mc.player.getHealth() <= 0)
		{
			setEnabled(false);
			return;
		}
		<commit_msg>:gem: Add missing comment in AntiAfkMod<commit_after>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package tk.wurst_client.features.mods;

import java.util.Random;

import net.minecraft.util.math.BlockPos;
import tk.wurst_client.ai.GoRandomAI;
import tk.wurst_client.events.listeners.UpdateListener;

@Mod.Info(name = "AntiAFK",
	description = "Walks around randomly to hide you from AFK detectors.",
	tags = "AFKBot,anti afk,afk bot",
	help = "Mods/AntiAFK")
@Mod.Bypasses(ghostMode = false)
public class AntiAfkMod extends Mod implements UpdateListener
{
	private GoRandomAI ai;
	private int timer;
	private Random random = new Random();
	
	@Override
	public void onEnable()
	{
		ai = new GoRandomAI(new BlockPos(mc.player), 16F);
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
		
		if(ai != null)
			ai.stop();
	}
	
	@Override
	public void onUpdate()
	{
		// check if player died
		if(mc.player.getHealth() <= 0)
		{
			setEnabled(false);
			return;
		}
		
		// update timer
{'fraction_non_alphanumeric': 0.11613406079501169, 'fraction_numerical': 0.011691348402182385, 'mean_word_length': 3.8161350844277675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5520260', 'n_tokens_mistral': 954, 'n_tokens_neox': 880, 'n_words': 251}