forked from RepoMirrors/kami-blue
change IceSpeed slipperiness setting to float
This commit is contained in:
parent
7e2b0f82dd
commit
0195e0e507
|
@ -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<Double> slipperiness = register(Settings.doubleBuilder("Slipperiness").withMinimum(0.2).withValue(0.4).withMaximum(1.0).build());
|
||||
private Setting<Float> 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
|
||||
|
|
Loading…
Reference in New Issue