package com.brohoof.minelittlepony; import java.io.File; import com.google.gson.GsonBuilder; import com.google.gson.annotations.Expose; import com.mumfrey.liteloader.modconfig.AdvancedExposable; import com.mumfrey.liteloader.modconfig.ConfigStrategy; import com.mumfrey.liteloader.modconfig.ExposableOptions; import net.minecraft.util.EnumTypeAdapterFactory; @ExposableOptions(filename = "minelittlepony", strategy = ConfigStrategy.Unversioned) public class PonyConfig implements AdvancedExposable { @Expose private Value ponylevel = new Value(PonyLevel.PONIES); @Expose private Value sizes = new Value(true); @Expose private Value snuzzles = new Value(true); @Expose private Value hd = new Value(true); @Expose private Value showscale = new Value(true); @Expose private Value villagers = new Value(true); @Expose private Value zombies = new Value(true); @Expose private Value pigzombies = new Value(true); @Expose private Value skeletons = new Value(true); public Value getPonyLevel() { if (ponylevel.get() == null) ponylevel.set(PonyLevel.PONIES); return ponylevel; } public Value getSizes() { return sizes; } public Value getSnuzzles() { return snuzzles; } public Value getHd() { return hd; } public Value getShowScale() { return showscale; } public Value getVillagers() { return villagers; } public Value getZombies() { return zombies; } public Value getPigZombies() { return pigzombies; } public Value getSkeletons() { return skeletons; } @Override public void setupGsonSerialiser(GsonBuilder gsonBuilder) { gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory()) .registerTypeAdapter(Value.class, new Value.Serializer()); } @Override public File getConfigFile(File configFile, File configFileLocation, String defaultFileName) { return null; } }