var scriptName = "Test";
var scriptAuthor = "6Sence";
var scriptVersion = 1.0;

function Test() {

    this.getName = function () {
        return "Test";
    }
    this.getCategory = function () {
        return "Misc";
    }

    this.getDescription = function () {
        return "Test";
    }

    this.onUpdate = function () {
		if (mc.thePlayer.motionY <= 0 && !mc.thePlayer.onGround){
		
		OPMY = PMY;
		if (!mc.thePlayer.onGround){
			PMY = (PMY - 0.08) * 0.98;
		}
		
		CMY = (Math.round (mc.thePlayer.motionY * 10000) / 10000);
		PMY = (Math.round (PMY * 10000) / 10000);
		}
		
		//OPMY is predicted motionY
		if (!mc.thePlayer.onGround){
			chat.print ("Predicted : " + OPMY + "  ||  MotionY : " + mc.thePlayer.motionY);
		}
    }

    this.onEnable = function () {
		enable = false;
		OPMY = mc.thePlayer.motionY;
		PMY = mc.thePlayer.motionY;
		CMY = mc.thePlayer.motionY;
    }
    this.onDisable = function () {
    }
}

var Test = new Test();
var derpClient;

function onEnable() {
    derpClient = moduleManager.registerModule(Test);
}

function onDisable() {
    moduleManager.unregisterModule(derpClient);
}