feat: added vanillaflight, moved modules
This commit is contained in:
parent
503c398ca8
commit
2867df0f51
3 changed files with 32 additions and 1 deletions
|
@ -35,6 +35,7 @@ import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import co.fantabos.bscv.Module;
|
import co.fantabos.bscv.Module;
|
||||||
|
import co.fantabos.bscv.modules.*;
|
||||||
|
|
||||||
// The value here should match an entry in the META-INF/mods.toml file
|
// The value here should match an entry in the META-INF/mods.toml file
|
||||||
@Mod("bscv")
|
@Mod("bscv")
|
||||||
|
@ -68,6 +69,7 @@ public class BoSCoVicino {
|
||||||
BoSCoVicino.mods = new ArrayList<Module>();
|
BoSCoVicino.mods = new ArrayList<Module>();
|
||||||
|
|
||||||
BoSCoVicino.mods.add(new Fullbright(builder, this.dispatcher));
|
BoSCoVicino.mods.add(new Fullbright(builder, this.dispatcher));
|
||||||
|
BoSCoVicino.mods.add(new VanillaFlight(builder, this.dispatcher));
|
||||||
|
|
||||||
ForgeConfigSpec spec = builder.build();
|
ForgeConfigSpec spec = builder.build();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package co.fantabos.bscv;
|
package co.fantabos.bscv.modules;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.event.TickEvent;
|
import net.minecraftforge.event.TickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
|
||||||
|
import co.fantabos.bscv.Module;
|
||||||
|
import co.fantabos.bscv.BoSCoVicino;
|
||||||
|
|
||||||
public class Fullbright extends Module {
|
public class Fullbright extends Module {
|
||||||
|
|
||||||
private final ForgeConfigSpec.ConfigValue<String> mode;
|
private final ForgeConfigSpec.ConfigValue<String> mode;
|
26
src/main/java/co/fantabos/bscv/modules/VanillaFlight.java
Normal file
26
src/main/java/co/fantabos/bscv/modules/VanillaFlight.java
Normal file
|
@ -0,0 +1,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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue