var C06PacketPlayerPosLook = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook');
var script = registerScript({
    name: 'RedeskyPhase',
    version: '0.0.0',
    authors: ['Shurpe']
});
script.registerModule({
    name: 'RedeskyPhase',
    description: 'Phase for Redesky',
    category: 'Fun'

}, function (module) {
    module.on('enable', function () {
        if (mc.thePlayer.isCollidedHorizontally) {
            mc.thePlayer.sendQueue.addToSendQueue(new C06PacketPlayerPosLook(mc.thePlayer.posX, mc.thePlayer.posY + -0.00000001, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, false));
            mc.thePlayer.sendQueue.addToSendQueue(new C06PacketPlayerPosLook(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, false));
        } else {
            Chat.print('§7[§fRedeskyPhase§7] You need to stand close to blocks');
        }
    });
	module.on('update', function () {
        module.setState(false);
    });
});
