2015-11-02 12:39:44 -08:00
package WayofTime.bloodmagic ;
2015-10-29 20:22:14 -07:00
2016-09-12 19:54:46 -07:00
import WayofTime.bloodmagic.meteor.MeteorConfigHandler ;
2017-08-19 18:56:50 -07:00
import net.minecraftforge.common.config.Config ;
import net.minecraftforge.common.config.ConfigManager ;
2016-05-30 18:20:31 -07:00
import net.minecraftforge.fml.client.event.ConfigChangedEvent ;
2017-08-19 18:56:50 -07:00
import net.minecraftforge.fml.common.Mod ;
2016-05-30 18:20:31 -07:00
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent ;
2017-08-15 21:30:48 -07:00
2017-08-19 18:56:50 -07:00
@Config ( modid = BloodMagic . MODID , name = BloodMagic . MODID + " / " + BloodMagic . MODID , category = " " )
2017-10-13 17:41:54 -07:00
@Mod.EventBusSubscriber ( modid = BloodMagic . MODID )
2017-08-15 21:30:48 -07:00
public class ConfigHandler {
2015-10-29 20:22:14 -07:00
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Blacklist options for various features " } )
2017-08-19 18:56:50 -07:00
public static ConfigBlacklist blacklist = new ConfigBlacklist ( ) ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Value modifiers for various features " } )
2017-08-19 18:56:50 -07:00
public static ConfigValues values = new ConfigValues ( ) ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Toggles for all rituals " } )
2017-08-19 18:56:50 -07:00
public static ConfigRituals rituals = new ConfigRituals ( ) ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Settings that only pertain to the client " } )
2017-08-19 18:56:50 -07:00
public static ConfigClient client = new ConfigClient ( ) ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Compatibility settings " } )
2017-08-19 18:56:50 -07:00
public static ConfigCompat compat = new ConfigCompat ( ) ;
2018-02-14 23:38:57 -08:00
@SubscribeEvent
public static void onConfigChanged ( ConfigChangedEvent . OnConfigChangedEvent event ) {
if ( event . getModID ( ) . equals ( BloodMagic . MODID ) ) {
ConfigManager . sync ( event . getModID ( ) , Config . Type . INSTANCE ) ; // Sync config values
MeteorConfigHandler . handleMeteors ( false ) ; // Reload meteors
}
}
2017-08-19 18:56:50 -07:00
public static class ConfigBlacklist {
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Stops listed blocks and entities from being teleposed. " , " Use the registry name of the block or entity. Vanilla objects do not require the modid. " , " If a block is specified, you can list the variants to only blacklist a given state. " } )
public String [ ] teleposer = { " bedrock " , " mob_spawner " } ;
@Config.Comment ( { " Stops listed blocks from being transposed. " , " Use the registry name of the block. Vanilla blocks do not require the modid. " } )
public String [ ] transposer = { " bedrock " , " mob_spawner " } ;
@Config.Comment ( { " Stops the listed entities from being used in the Well of Suffering. " , " Use the registry name of the entity. Vanilla entities do not require the modid. " } )
public String [ ] wellOfSuffering = { } ;
2017-08-15 21:30:48 -07:00
}
2017-08-19 18:56:50 -07:00
public static class ConfigValues {
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Declares the amount of LP gained per HP sacrificed for the given entity. " , " Setting the value to 0 will blacklist it. " , " Use the registry name of the entity followed by a ';' and then the value you want. " , " Vanilla entities do not require the modid. " } )
public String [ ] sacrificialValues = { " villager;100 " , " slime;15 " , " enderman;10 " , " cow;100 " , " chicken;100 " , " horse;100 " , " sheep;100 " , " wolf;100 " , " ocelot;100 " , " pig;100 " , " rabbit;100 " } ;
@Config.Comment ( { " Amount of LP the Coat of Arms should provide for each damage dealt. " } )
2017-08-19 18:56:50 -07:00
@Config.RangeInt ( min = 0 , max = 100 )
public int coatOfArmsConversion = 20 ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Amount of LP the Sacrificial Dagger should provide for each damage dealt. " } )
2017-08-19 18:56:50 -07:00
@Config.RangeInt ( min = 0 , max = 10000 )
public int sacrificialDaggerConversion = 100 ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Will rewrite any default meteor types with new versions. " , " Disable this if you want any of your changes to stay, or do not want default meteor types regenerated. " } )
2017-08-19 18:56:50 -07:00
public boolean shouldResyncMeteors = true ;
2015-10-29 20:22:14 -07:00
}
2017-08-19 18:56:50 -07:00
public static class ConfigRituals {
public boolean ritualAnimalGrowth = true ;
public boolean ritualContainment = true ;
public boolean ritualCrushing = true ;
public boolean ritualExpulsion = true ;
public boolean ritualFeatheredKnife = true ;
public boolean ritualFullStomach = true ;
public boolean ritualGreenGrove = true ;
public boolean ritualHarvest = true ;
public boolean ritualInterdiction = true ;
public boolean ritualJumping = true ;
public boolean ritualLava = true ;
public boolean ritualMagnetic = true ;
public boolean ritualRegeneration = true ;
public boolean ritualSpeed = true ;
public boolean ritualSuppression = true ;
public boolean ritualWater = true ;
public boolean ritualWellOfSuffering = true ;
public boolean ritualZephyr = true ;
public boolean ritualUpgradeRemove = true ;
public boolean ritualArmourEvolve = true ;
public boolean ritualForsakenSoul = true ;
public boolean ritualCrystalHarvest = true ;
public boolean ritualPlacer = true ;
public boolean ritualFelling = true ;
public boolean ritualPump = true ;
public boolean ritualAltarBuilder = true ;
public boolean ritualPortal = true ;
public boolean ritualMeteor = true ;
public boolean ritualDowngrade = true ;
public ConfigImperfectRituals imperfect = new ConfigImperfectRituals ( ) ;
2015-10-29 20:22:14 -07:00
}
2017-08-19 18:56:50 -07:00
public static class ConfigImperfectRituals {
public boolean imperfectRitualNight = true ;
public boolean imperfectRitualRain = true ;
public boolean imperfectRitualResistance = true ;
public boolean imperfectRitualZombie = true ;
}
2015-10-29 20:22:14 -07:00
2017-08-19 18:56:50 -07:00
public static class ConfigClient {
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Always render the beams between routing nodes. " , " If disabled, the beams will only render while the Node Router is held. " } )
2017-08-19 18:56:50 -07:00
public boolean alwaysRenderRoutingLines = false ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " Completely hide spectral blocks from view. " , " If disabled, a transparent block will be displayed. " } )
2017-08-19 18:56:50 -07:00
public boolean invisibleSpectralBlocks = true ;
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " When cycling through slots, the Sigil of Holding will skip over empty slots and move to the next occupied one. " , " If disabled, it will behave identically to the default hotbar. " } )
2017-08-19 18:56:50 -07:00
public boolean sigilHoldingSkipsEmptySlots = false ;
}
2015-10-29 20:22:14 -07:00
2017-08-19 18:56:50 -07:00
public static class ConfigCompat {
2018-02-14 23:38:57 -08:00
@Config.Comment ( { " The display mode to use when looking at a Blood Altar. " , " ALWAYS - Always display information. " , " SIGIL_HELD - Only display information when a Divination or Seers sigil is held in either hand. " , " SIGIL_CONTAINED - Only display information when a Divination or Seers sigil is somewhere in the inventory. " } )
2017-08-19 18:56:50 -07:00
public AltarDisplayMode wailaAltarDisplayMode = AltarDisplayMode . SIGIL_HELD ;
2015-10-29 20:22:14 -07:00
2017-08-19 18:56:50 -07:00
public enum AltarDisplayMode {
ALWAYS ,
SIGIL_HELD ,
2018-02-14 23:38:57 -08:00
SIGIL_CONTAINED , ;
2016-01-19 19:46:49 -08:00
}
}
2015-10-29 20:22:14 -07:00
}