Jump to content

Config always returns false


OrangeVillager61

Recommended Posts

Why does my config file always return false? The default is true but it returns false.

public class Config {
public static boolean ender_meat_enable;
public static int amount_salt_brine;
public static boolean enable_custom_villagers;
public static boolean creeper_crafting_enable;
public static boolean enable_biomatter;
public static boolean enable_salt;
public static boolean enable_drops;
public static final Config instance = new Config();

public void load(FMLPreInitializationEvent event)
{
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
amount_salt_brine = config.getInt("Amount of salt per brine", Configuration.CATEGORY_GENERAL, 4, 1, 16, "Set this to the number that you want from bucket of salt when crafting(1-16), for game balance I'd leave it to the default.");
ender_meat_enable = config.getBoolean("Endermeat Enable", Configuration.CATEGORY_GENERAL, true, "Set this to true if you want raw ender to have status effects.");
creeper_crafting_enable = config.getBoolean("Enable crafting of ''griefer'' eggs", Configuration.CATEGORY_GENERAL, true, 
		"Set this to false if you want to disallow the crafting of creeper spawn eggs and blaze spawn eggs. Mainly for griefing prevention. Note: Disabling biomatter also disables ''griefer'' eggs.");
enable_salt = config.getBoolean("Enable Salt", Configuration.CATEGORY_GENERAL, true, "Set this to true if you want salt.");
	enable_biomatter = config.getBoolean("Enable Biomatter", Configuration.CATEGORY_GENERAL, true, "Set this to false if you want to disallow the crafting of biomatter and all spawn eggs.");
	enable_custom_villagers = config.getBoolean("Enable custom villagers", Configuration.CATEGORY_GENERAL, true, "If this is true, then WIP custom villagers will spawn. Please back up your world(s) when disabling this.");
if (config.hasChanged())
{
	config.save();
}
}
}

Link to comment
Share on other sites

If you changed the config file to have "false" in it, then it will read the config file's value.  The default value is what is used when the option in the config file doesn't exist.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Which one of those several config values is messing up?

 

Also, post the config file.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Config file below:

 

# Configuration file

general {
    # Set this to the number that you want from bucket of salt when crafting(1-16), for game balance I'd leave it to the default. [range: 1 ~ 16, default: 4]
    I:"Amount of salt per brine"=4

    # Set this to false if you want to disallow the crafting of biomatter and all spawn eggs. [default: true]
    B:"Enable Biomatter"=true

    # Set this to true if you want salt. [default: true]
    B:"Enable Salt"=true

    # Set this to false if you want to disallow the crafting of creeper spawn eggs and blaze spawn eggs. Mainly for griefing prevention. Note: Disabling biomatter also disables ''griefer'' eggs. [default: true]
    B:"Enable crafting of ''griefer'' eggs"=true

    # If this is true, then WIP custom villagers will spawn. Please back up your world(s) when disabling this. [default: true]
    B:"Enable custom villagers"=true

    # Set this to true if you want raw ender to have status effects. [default: true]
    B:"Endermeat Enable"=true
}


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.