From 0195e0e507cf11c8b1f7eabeb029b3fc0fe9aa3b Mon Sep 17 00:00:00 2001 From: blockparole <48992448+blockparole@users.noreply.github.com> Date: Sun, 24 Nov 2019 16:47:41 +0100 Subject: [PATCH] change IceSpeed slipperiness setting to float --- .../kami/module/modules/movement/IceSpeed.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/movement/IceSpeed.java b/src/main/java/me/zeroeightsix/kami/module/modules/movement/IceSpeed.java index 2cad1bd8..ea40df76 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/movement/IceSpeed.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/movement/IceSpeed.java @@ -7,19 +7,18 @@ import net.minecraft.init.Blocks; /** * Created on 26 October 2019 by hub - * Updated 21 November 2019 by hub + * Updated 24 November 2019 by hub */ @Module.Info(name = "IceSpeed", description = "Ice Speed", category = Module.Category.MOVEMENT) public class IceSpeed extends Module { - // Using double here cause float isnt cut off in the gui (example: 0.40000089485) - private Setting slipperiness = register(Settings.doubleBuilder("Slipperiness").withMinimum(0.2).withValue(0.4).withMaximum(1.0).build()); + private Setting slipperiness = register(Settings.floatBuilder("Slipperiness").withMinimum(0.2f).withValue(0.4f).withMaximum(1.0f).build()); @Override public void onUpdate() { - Blocks.ICE.slipperiness = slipperiness.getValue().floatValue(); - Blocks.PACKED_ICE.slipperiness = slipperiness.getValue().floatValue(); - Blocks.FROSTED_ICE.slipperiness = slipperiness.getValue().floatValue(); + Blocks.ICE.slipperiness = slipperiness.getValue(); + Blocks.PACKED_ICE.slipperiness = slipperiness.getValue(); + Blocks.FROSTED_ICE.slipperiness = slipperiness.getValue(); } @Override