summaryrefslogtreecommitdiff
path: root/src/main/java/co/fantabos/bscv/Fullbright.java
blob: f8aba8d06f4fc79591ff3f0994a2c7dbb36ea1bb (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
27
package co.fantabos.bscv;

import net.minecraft.potion.Effect;
import net.minecraft.potion.EffectInstance;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

public class Fullbright extends Module {
   
   private final ForgeConfigSpec.ConfigValue<String> mode;

   public Fullbright(ForgeConfigSpec.Builder builder) {
      super("Fullbright", Group.VISION, builder);

      this.mode = builder.comment("either potion or gamma").define("mode", "potion");
   }

   @SubscribeEvent
   public void onTick(TickEvent.ClientTickEvent event) {
      if (BoSCoVicino.minecraft == null) return;
      if (BoSCoVicino.minecraft.player == null) return;
      if (this.mode.get().equals("potion")) {
         BoSCoVicino.minecraft.player.addEffect(new EffectInstance(Effect.byId(16), 5204));
      }
   }
}