2014-12-15 00:11:48 +00:00
package com.cricketcraft.chisel ;
2014-07-17 22:05:29 +01:00
import net.minecraftforge.common.config.Configuration ;
public class Configurations
{
public static Configuration config ;
public static boolean configExists ;
public static boolean oldPillars ;
public static boolean disableCTM ;
public static boolean blockDescriptions ;
public static boolean ghostCloud ;
public static boolean allowMossy ;
2014-08-11 13:35:49 +01:00
public static boolean chiselRecipe ;
2014-10-27 16:26:14 -04:00
public static boolean autoChisel ;
2014-11-24 18:48:10 -05:00
public static boolean fancy ;
2014-12-02 21:00:52 -05:00
public static boolean enableFMP ;
2014-07-17 22:05:29 +01:00
public static int factoryBlockAmount ;
public static int particlesTickrate ;
2014-07-26 09:17:49 +01:00
public static int marbleAmount ;
public static int limestoneAmount ;
2014-07-17 22:05:29 +01:00
public static double concreteVelocity ;
2014-07-26 09:17:49 +01:00
public static boolean refreshConfig ()
2014-07-17 22:05:29 +01:00
{
concreteVelocity = config . get ( "general" , "concreteVelocity" , 0 . 45 , "Traversing concrete roads, players will acceleration to this velocity. For reference, normal running speed is about 0.28. Set to 0 to disable acceleration." ). getDouble ( 0 . 45 );
particlesTickrate = config . get ( "client" , "particleTickrate" , 1 , "Particle tick rate. Greater value = less particles." ). getInt ( 1 );
oldPillars = config . get ( "client" , "pillarOldGraphics" , false , "Use old pillar textures" ). getBoolean ( false );
disableCTM = ! config . get ( "client" , "connectedTextures" , true , "Enable connected textures" ). getBoolean ( true );
2014-11-24 18:48:10 -05:00
fancy = config . get ( "client" , "fancyLeaves" , true , "Enable fancy textures" ). getBoolean ( true );
2014-07-17 22:05:29 +01:00
blockDescriptions = config . get ( "client" , "tooltipsUseBlockDescriptions" , true , "Make variations of blocks have the same name, and use the description in tooltip to distinguish them." ). getBoolean ( true );
ghostCloud = config . get ( "general" , "doesCloudRenderLikeGhost" , true ). getBoolean ( true );
factoryBlockAmount = config . get ( "general" , "amountYouGetFromFactoryBlockCrafting" , 32 ). getInt ( 32 );
allowMossy = config . get ( "general" , "allowCobbleToMossyInChisel" , true ). getBoolean ( true );
2014-09-16 09:35:03 +01:00
marbleAmount = config . get ( "worldgen" , "marbleAmount" , 7 , "Amount of marble to generate in the world; use 0 for none" ). getInt ( 7 );
2014-07-26 09:17:49 +01:00
limestoneAmount = config . get ( "worldgen" , "limestoneAmount" , 8 , "Amount of limestone to generate in the world; use 0 for none" ). getInt ( 8 );
2014-08-11 13:46:17 +01:00
chiselRecipe = config . get ( "general" , "chiselAlternateRecipe" , false , "Use alternative crafting recipe for the chisel" ). getBoolean ( false );
2014-12-02 21:00:52 -05:00
autoChisel = config . get ( "general" , "autoChisel" , true , "Should people be allowed to use the auto chisel" ). getBoolean ( true );
enableFMP = config . get ( "general" , "enableFMP" , true , "Do you want to enable FMP" ). getBoolean ( true );
2014-07-17 22:05:29 +01:00
if ( config . hasChanged ())
{
config . save ();
}
2014-07-26 09:17:49 +01:00
return true ;
}
public static boolean featureEnabled ( String feature )
{
return config . get ( "features" , feature , true ). getBoolean ( true ) && refreshConfig ();
2014-07-17 22:05:29 +01:00
}
}