var scriptName = "NoSlip";
var scriptAuthor = "Soulplexis";
var scriptVersion = 1.0;

var blocks = Java.type("net.minecraft.init.Blocks");
function Derp() {
	var RockSaltAmount = value.createFloat("Slipperiness", 0.4, 0.4, 1.0);
    this.getName = function() {
        return "NoSlip";
    }
    this.getCategory = function() {
        return "Movement";   
    }

    this.getDescription = function() {
        return "Puts rock salt on the ice to make it less slippery.";
    }	
	this.onEnable = function() {
		blocks.ice.slipperiness = RockSaltAmount.get();
		blocks.packed_ice.slipperiness = RockSaltAmount.get();
	}
	this.onDisable = function() {
		blocks.ice.slipperiness = 0.98;
		blocks.packed_ice.slipperiness = 0.98;
	}
	this.addValues = function(values) {
		values.add(RockSaltAmount);
	}
}

var derp = new Derp();
var derpClient;

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

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