#include "Timer.h"
#include "Client.h"

auto Timer::onWorldTick(Player* _this) -> void {
	auto clientinstance = Client::clientinstance;
	if (!clientinstance) return;

	auto minecraft = clientinstance->getMinecraft();
	if (!minecraft) return;

	auto realtimer = minecraft->getTimer();
	if (!realtimer) return;

	realtimer->mTicksPerSecond = tps;
}

auto Timer::onDisabled() -> void {
	auto clientinstance = Client::clientinstance;
	if (!clientinstance) return;

	auto minecraft = clientinstance->getMinecraft();
	if (!minecraft) return;

	auto realtimer = minecraft->getTimer();

	realtimer->mTicksPerSecond = 20.f;
}
