This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
SorceryCraft/src/main/java/com/thebrokenrail/sorcerycraft/ModConfig.java

33 lines
973 B
Java

package com.thebrokenrail.sorcerycraft;
import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Config(name = SorceryCraft.NAMESPACE)
public class ModConfig implements ConfigData {
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@interface UsePercentage {
double min();
double max();
}
@UsePercentage(min = 0, max = 1)
public double failureChance = 0.3;
@ConfigEntry.Gui.CollapsibleObject(startExpanded = true)
public LimitCastingTable limitCastingTable = new LimitCastingTable();
public static class LimitCastingTable {
public boolean creative = false;
public boolean survival = true;
}
}