aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/co/fantabos/bscv/modules/VanillaFlight.java
blob: f8e2312122c5a7a18278974b4ad37aa04fd5f22e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package co.fantabos.bscv.modules;

import com.mojang.brigadier.CommandDispatcher;

import co.fantabos.bscv.BoSCoVicino;
import co.fantabos.bscv.Module;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.command.CommandSource;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

public class VanillaFlight extends Module {

   public VanillaFlight(ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
      super("VanillaFlight", Group.CORE, builder, dispatcher);
   }

   @SubscribeEvent
   public void onTick(TickEvent.ClientTickEvent event) {
      ClientPlayerEntity player = BoSCoVicino.minecraft.player;
      if (player != null) {
         player.abilities.mayfly = true;
      }
   }
}