var scriptName = "Pullback from FLUX"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulple-x'is";

var module = new module();
var highJumpClient;
var C04PacketPlayerPosition = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition');

 // Converts from degrees to radians.
 Math.radians = function(degrees) {
    return degrees * Math.PI / 180;
  };
   
  // Converts from radians to degrees.
  Math.degrees = function(radians) {
    return radians * 180 / Math.PI;
  };
  
function hClip(offset) { //
    var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
	mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX - (Math.sin(playerYaw) * offset), mc.thePlayer.posY, mc.thePlayer.posZ + (Math.cos(playerYaw) * offset), mc.thePlayer.onGround));
}  

function vClip(offset) { // 
	mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset, mc.thePlayer.posZ, mc.thePlayer.onGround));
}  

// coordinate variables
function module() {
    this.getName = function() {
        return "PullBack";
    };

    this.getDescription = function() {
        return "Pulls you back via anticheat.";
    };

    this.getCategory = function() {
        return "Fun";
    };
	this.onEnable = function() {
		mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 1, mc.thePlayer.posZ, mc.thePlayer.onGround));
	}
	this.onMotion = function(){
		PullBack.setState(false);
	}

    this.onDisable = function() {
    }
}


function onLoad() {
};

function onEnable() {
    highJumpClient = moduleManager.registerModule(module);
};

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