Skip to content

Commit

Permalink
add fly settings
Browse files Browse the repository at this point in the history
  • Loading branch information
majorsopa committed Jun 11, 2021
1 parent 53356dc commit 754003f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
package com.evaan.frostburn.module.modules.movement;

import com.evaan.frostburn.module.Module;
import com.evaan.frostburn.util.Setting;
import net.minecraft.entity.player.PlayerAbilities;

public class Fly extends Module {
public Fly() {super("Fly", Module.Category.MOVEMENT);}

Setting<Float> speed = register(
new Setting(
"Speed",
this,
100f,
1f,
500f
)
);

@Override
public void onUpdate() {
assert mc.player != null;

PlayerAbilities abilities = mc.player.getAbilities();
abilities.flying = true;

abilities.setFlySpeed(speed.getValue() / 5000);

mc.player.sendAbilitiesUpdate();
}

Expand Down

0 comments on commit 754003f

Please sign in to comment.