当前位置: 首页>>代码示例>>Java>>正文


Java Configuration.addCustomCategoryComment方法代码示例

本文整理汇总了Java中net.minecraftforge.common.config.Configuration.addCustomCategoryComment方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.addCustomCategoryComment方法的具体用法?Java Configuration.addCustomCategoryComment怎么用?Java Configuration.addCustomCategoryComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.common.config.Configuration的用法示例。


在下文中一共展示了Configuration.addCustomCategoryComment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAreaProtConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
/**
 * Adds configuration entries to the AreaProt category of the config file
 * @param cfg Configuration object
 */
private static void initAreaProtConfig(Configuration cfg) {
	cfg.addCustomCategoryComment(CATEGORY_AREAPROTECTOR, "Area Protector configuration");
	
	areaProtectorX = cfg.getInt("areaprotectorx", CATEGORY_AREAPROTECTOR, 5, 1, 64,
			"Distance from the Area Protector to protect, along the x axis (total distance is 2*this+1)");
	areaProtectorY = cfg.getInt("areaprotectory", CATEGORY_AREAPROTECTOR, 5, 1, 64,
			"Distance from the Area Protector to protect, along the y axis (total distance is 2*this+1)");
	areaProtectorZ = cfg.getInt("areaprotectorz", CATEGORY_AREAPROTECTOR, 5, 1, 64,
			"Distance from the Area Protector to protect, along the z axis (total distance is 2*this+1)");
	
	enableMobProtectionAreaProtector = cfg.getBoolean("enablemobprotectionareaprotector", CATEGORY_AREAPROTECTOR, true,
       		"Set to false to disable teleporting hostile mobs out of the protected area.");
       enableArrowProtectionAreaProtector = cfg.getBoolean("enablearrowprotectionareaprotector", CATEGORY_AREAPROTECTOR, true,
       			"Set to false to disable killing Skeleton arrows shot into the protected area.");
       enablePotionProtectionAreaProtector = cfg.getBoolean("enablepotionprotectionareaprotector", CATEGORY_AREAPROTECTOR, true,
       			"Set to false to disable blocking Witch potions from entering the protected area.");
       enableWolfProtectionAreaProtector = cfg.getBoolean("enablewolfprotectionareaprotector", CATEGORY_AREAPROTECTOR, false,
       			"Set to false to disable calming hostile wolves in the protected area.");
       enableSlimeProtectionAreaProtector = cfg.getBoolean("enableslimeprotectionareaprotector", CATEGORY_AREAPROTECTOR, true,
       			"Set to false to disable teleporting slimes out of the protected area.");
       
       enableAreaProtectorRecipe = cfg.getBoolean("enableareaprotectorrecipe", CATEGORY_AREAPROTECTOR, true,
			"Enables the crafting recipe for the Area Protector block.");
}
 
开发者ID:Maxwell-lt,项目名称:MobBlocker,代码行数:29,代码来源:Config.java

示例2: preLoad

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
@Mod.EventHandler
public void preLoad(FMLPreInitializationEvent event)
{
    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();

    config.addCustomCategoryComment("general", "General settings");
    fancyWeightage = config.getInt("fancyWeightage", "general", 80, 0, 100, "Weightage of llamas wearing parts of their outfit, in percentage% (0-100)");
    randomizeParts = config.getInt("randomizeParts", "general", 1, 0, 1, "0 = Render the entire outfit (except disabled parts)\n1 = Randomly choose which parts of the outfit to render (per llama)");
    disabledParts = config.getStringList("disabledParts", "general", disabledParts, "Disable parts of the outfit", new String[] { "hat", "monocle", "pipe", "bowtie", "fez", "moustache" });

    if(config.hasChanged())
    {
        config.save();
    }

    MinecraftForge.EVENT_BUS.register(this);
}
 
开发者ID:iChun,项目名称:BetterThanLlamas,代码行数:19,代码来源:BetterThanLlamas.java

示例3: initGeneralConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initGeneralConfig(Configuration cfg) {
	cfg.addCustomCategoryComment(CATEGORY_GENERAL, "General Options");
	cfg.addCustomCategoryComment(CATEGORY_WORLD, "World Generation Options");
	
	LODESTONE_FREQUENCY = cfg.getInt("Lodestone Frequency", CATEGORY_WORLD, 4, 0, 64, "Number of lodestone veins per chunk");
	LODESTONE_VEIN_SIZE = cfg.getInt("Lodestone Vein Size", CATEGORY_WORLD, 5, 0, 64, "Blocks per lodestone vein");
	LODESTONE_MIN_Y = cfg.getInt("Lodestone Min Y", CATEGORY_WORLD, 0, 0, 256, "Minimum y value where lodestone veins can spawn");
	LODESTONE_MAX_Y = cfg.getInt("Lodestone Max Y", CATEGORY_WORLD, 40, 0, 256, "Maximum y value where lodestone veins can spawn");
	
	RIFT_FREQUENCY = cfg.getInt("Rift Frequency", CATEGORY_WORLD, 16, 0, 1024, "How common rifts are in worldgen.\nA rift will spawn in 1 in every x chunks with a low enough stability value.");
	
	PROPERTY_ORDER_WORLD.add("Lodestone Frequency");
	PROPERTY_ORDER_WORLD.add("Lodestone Vein Size");
	PROPERTY_ORDER_WORLD.add("Lodestone Min Y");
	PROPERTY_ORDER_WORLD.add("Lodestone Max Y");
	PROPERTY_ORDER_WORLD.add("Rift Frequency");
	
	cfg.setCategoryPropertyOrder(CATEGORY_GENERAL, PROPERTY_ORDER_GENERAL);
	cfg.setCategoryPropertyOrder(CATEGORY_WORLD, PROPERTY_ORDER_WORLD);
}
 
开发者ID:the-realest-stu,项目名称:Etheric,代码行数:21,代码来源:Config.java

示例4: initGeneralConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initGeneralConfig(Configuration cfg) {
    cfg.addCustomCategoryComment(CATEGORY_GENERAL, "General configuration");
    portalTimeout = cfg.getInt("portalTimeout", CATEGORY_GENERAL, portalTimeout, 1, 1000000, "Amount of ticks until the portalpair disappears");
    portalTimeoutAfterEntry = cfg.getInt("portalTimeoutAfterEntry", CATEGORY_GENERAL, portalTimeoutAfterEntry, 1, 1000000, "Amount of ticks until the portalpair disappears after an entity has gone through");
    maxCharge = cfg.getInt("maxCharge", CATEGORY_GENERAL, maxCharge, 1, 1000000, "Maximum charge in a portalgun/cartridge");
    chargesPerEnderpearl = cfg.getInt("chargesPerEnderpearl", CATEGORY_GENERAL, chargesPerEnderpearl, 1, 1000000, "Number of charges per enderpearl");
    meeCreepBoxMaxUsage = cfg.getInt("meeCreepBoxMaxUsage", CATEGORY_GENERAL, meeCreepBoxMaxUsage, -1, 1000000, "Maximum number of uses for a single MeeCreep box (-1 means unlimited)");
    maxMeecreepsPerPlayer = cfg.getInt("maxMeecreepsPerPlayer", CATEGORY_GENERAL, maxMeecreepsPerPlayer, -1, 1000000, "Maximum number of active MeeCreeps per player (-1 means unlimited)");

    meeCreepVolume = cfg.getFloat("meeCreepVolume", CATEGORY_GENERAL, meeCreepVolume, 0, 1, "Volume of the MeeCreep");
    teleportVolume = cfg.getFloat("teleportVolume", CATEGORY_GENERAL, teleportVolume, 0, 1, "Volume of the Portal Gun");

    messageX = cfg.getInt("messageX", CATEGORY_GENERAL, messageX, -100, 100, "Balloon horizontal postion: 0 means centered, positive means percentage offset from left side, negative means percentage offset from right side");
    messageY = cfg.getInt("messageY", CATEGORY_GENERAL, messageY, -100, 100, "Balloon vertical position: 0 means centered, positive means percentage offset from top side, negative means percentage offset from bottom side");
    messageTimeout = cfg.getInt("messageTimeout", CATEGORY_GENERAL, messageTimeout, 1, 10000, "Number of ticks (20 ticks per second) before the balloon message disappears");

    maxSpawnCount = cfg.getInt("maxSpawnCount", CATEGORY_GENERAL, maxSpawnCount, 1, 200, "Spawn cap for an angry MeeCreep (a MeeCreep with a box)");
    maxTreeBlocks = cfg.getInt("maxTreeBlocks", CATEGORY_GENERAL, maxTreeBlocks, 1, 100000, "Maximum number of tree blocks a single MeeCreep can chop down");

    delayAtHardness = cfg.getFloat("delayAtHardness", CATEGORY_GENERAL, delayAtHardness, 0, 10000000, "Delay harvest of blocks if hardness is bigger then this value");
    delayFactor = cfg.getFloat("delayFactor", CATEGORY_GENERAL, delayFactor, 0, 1000, "Speed modifier for harvesting (i.e. how much faster a MeeCreep is compared to a player)");
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:23,代码来源:Config.java

示例5: initProtectionConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
/**
 * Adds configuration entries to the Protection category of the config file
 * @param cfg Configuration object
 */
private static void initProtectionConfig(Configuration cfg) {
	cfg.addCustomCategoryComment(CATEGORY_PROTECTION, "Chunk Protector configuration");
	
	enableMobProtection = cfg.getBoolean("enablemobprotection", CATEGORY_PROTECTION, true,
       		"Set to false to disable teleporting hostile mobs out of the protected area.");
       enableArrowProtection = cfg.getBoolean("enablearrowprotection", CATEGORY_PROTECTION, true,
       			"Set to false to disable killing Skeleton arrows shot into the protected area.");
       enablePotionProtection = cfg.getBoolean("enablepotionprotection", CATEGORY_PROTECTION, true,
       			"Set to false to disable blocking Witch potions from entering the protected area.");
       enableWolfProtection = cfg.getBoolean("enablewolfprotection", CATEGORY_PROTECTION, false,
       			"Set to false to disable calming hostile wolves in the protected area.");
       enableSlimeProtection = cfg.getBoolean("enableslimeprotection", CATEGORY_PROTECTION, true,
       			"Set to false to disable teleporting slimes out of the protected area.");
}
 
开发者ID:Maxwell-lt,项目名称:MobBlocker,代码行数:19,代码来源:Config.java

示例6: initEffectsSettings

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initEffectsSettings(Configuration cfg) {
    cfg.addCustomCategoryComment(CATEGORY_EFFECTS, "Effect settings");
    POTION_EFFECTS_PLAYER = cfg.getStringList("potionEffectsPlayer", CATEGORY_EFFECTS, POTION_EFFECTS_PLAYER, "A list of potion effects with every string of the form: 'amount,id[@amplitude]'");
    POTION_EFFECTS_PASSIVE = cfg.getStringList("potionEffectsPassive", CATEGORY_EFFECTS, POTION_EFFECTS_PASSIVE, "A list of potion effects with every string of the form: 'amount,id[@amplitude]'");
    POTION_EFFECTS_HOSTILE = cfg.getStringList("potionEffectsHostile", CATEGORY_EFFECTS, POTION_EFFECTS_HOSTILE, "A list of potion effects with every string of the form: 'amount,id[@amplitude]'");
    PROTECTIVE_HELMET_FACTOR = cfg.getFloat("protectiveHelmetFactor", CATEGORY_EFFECTS, PROTECTIVE_HELMET_FACTOR, 0, 1, "How much the protective helmet reduces the poison. 0 means full poison reduction, 1 means no effect");
    DIMENSIONS_WITH_POISON = cfg.getStringList("dimensionsWithPoison", CATEGORY_EFFECTS, DIMENSIONS_WITH_POISON, "List of dimensions where the air is poisonous. Use 'all' if you want all of them");
    DIMENSIONS_WITHOUT_POISON = cfg.getStringList("dimensionsWithoutPoison", CATEGORY_EFFECTS, DIMENSIONS_WITHOUT_POISON, "List of dimensions where the air is not poisonous. Used when 'dimensionsWithPoison' is equal to 'all'");

    PLANT_GROWTH_POISON_DENY = cfg.getInt("plantGrowthPoisonDeny", CATEGORY_EFFECTS, PLANT_GROWTH_POISON_DENY, 0, 256, "If poison is above this level plants cannot grow (256 to disable)");
    PLANT_GROWTH_POISON_SLOW = cfg.getInt("plantGrowthPoisonSlow", CATEGORY_EFFECTS, PLANT_GROWTH_POISON_SLOW, 0, 256, "If poison is above this level plants grow slower (256 to disable)");
    PLANT_GROWTH_SLOWDOWN_FACTOR = cfg.getFloat("plantGrowthPoisonSlow", CATEGORY_EFFECTS, PLANT_GROWTH_SLOWDOWN_FACTOR, 0, 1, "How much is plant growth made slower. 0 means no slow down, 1 means no growth ever");
}
 
开发者ID:McJty,项目名称:needtobreath,代码行数:14,代码来源:Config.java

示例7: initMachineSettings

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initMachineSettings(Configuration cfg) {
    cfg.addCustomCategoryComment(CATEGORY_MACHINES, "Machine settings");
    PURIFIER_MAXRF = cfg.getInt("purifierMaxRF", CATEGORY_MACHINES, PURIFIER_MAXRF, 1, 2000000000, "Maximum RF the purifier machine can keep in its internal buffer");
    PURIFIER_RFPERTICK = cfg.getInt("purifierRFPerTick", CATEGORY_MACHINES, PURIFIER_RFPERTICK, 0, 2000000000, "RF Per tick the purifier needs to run");
    PURIFIER_RFINPUTPERTICK = cfg.getInt("purifierRFInputPerTick", CATEGORY_MACHINES, PURIFIER_RFINPUTPERTICK, 0, 2000000000, "RF Per tick the purifier can input from one side");
    PURIFIER_TICKSPERCOAL = cfg.getInt("purifierTicksPerCoal", CATEGORY_MACHINES, PURIFIER_TICKSPERCOAL, 1, 2000000000, "How many ticks a single piece of coal can purify");
    PURIFIER_MAXCOALTICKS = cfg.getInt("purifierMaxCoalTicks", CATEGORY_MACHINES, PURIFIER_MAXCOALTICKS, 1, 2000000000, "Maximum coal tick capacity. Should be more then 'purifierTicksPerCoal'!");
}
 
开发者ID:McJty,项目名称:needtobreath,代码行数:9,代码来源:Config.java

示例8: initGeneralConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initGeneralConfig(Configuration cfg)
{
	cfg.addCustomCategoryComment(catGeneral, "General configuration");

	shiny_stone_drop_rate = cfg.getInt("shiny_stone_rate", catGeneral, shiny_stone_drop_rate, 0, 100, "Drop rate of shiny stone (percentage)");
	butter_emits_redstone_signal = cfg.getBoolean("butter_emits_redstone_signal", catGeneral, butter_emits_redstone_signal, "Whether butter randomly emits a redstone signal");
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:8,代码来源:Config.java

示例9: initFoodConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initFoodConfig(Configuration cfg)
{
	cfg.addCustomCategoryComment(catFood, "Food configuration");

	chickendinner_hunger = cfg.getInt("chicken_dinner_hunger", catFood, chickendinner_hunger, 0, 20, "Chicken Dinner hunger value");
	meatshroom_hunger = cfg.getInt("meatshroom_hunger", catFood, meatshroom_hunger, 0, 20, "Meatshroom hunger value");
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:8,代码来源:Config.java

示例10: initPermissionConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initPermissionConfig(Configuration cfg) {
    cfg.addCustomCategoryComment(CATEGORY_PERMISSON, "Permission configuration");
    for (MeeCreepsApi.Factory factory : MeeCreeps.api.getFactories()) {
        boolean allowed = cfg.getBoolean("allowed_" + factory.getId(), CATEGORY_PERMISSON, true, "");
        if (allowed) {
            allowedActions.add(factory.getId());
        }
    }
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:10,代码来源:Config.java

示例11: readMainConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void readMainConfig() {
    Configuration cfg = mainConfig;
    try {
        cfg.load();
        cfg.addCustomCategoryComment(GeneralConfiguration.CATEGORY_GENERAL, "General settings");

        GeneralConfiguration.init(cfg);
    } catch (Exception e1) {
        FMLLog.log(Level.ERROR, e1, "Problem loading config file!");
    } finally {
        if (mainConfig.hasChanged()) {
            mainConfig.save();
        }
    }
}
 
开发者ID:McJty,项目名称:interactionwheel,代码行数:16,代码来源:ConfigSetup.java

示例12: initGeneralConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initGeneralConfig(Configuration cfg) {
	cfg.addCustomCategoryComment(CATEGORY_GENERAL, "General configuration");
	windowTitle = cfg.getString("windowtitle", CATEGORY_GENERAL, "", "The title of the Minecraft window. Leave blank to keep the default window title for your version of Minecraft.\nSome special values that will be inserted at runtime:\n%mcver% -> The current Minecraft version\n%modcount% -> Number of loaded mods\n%time% -> Current system time\n");
	timeFormat = cfg.getString("timeformat", CATEGORY_GENERAL, "h:mm a", "Format to display time in. See http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns");
}
 
开发者ID:Maxwell-lt,项目名称:TitleChanger,代码行数:6,代码来源:Config.java

示例13: initGeneralSettings

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initGeneralSettings(Configuration cfg) {
    cfg.addCustomCategoryComment(CATEGORY_GENERAL, "General settings");
    BLOCKS_BLOCKING = cfg.getStringList("blocksBlocking", CATEGORY_GENERAL, BLOCKS_BLOCKING, "List of blocks that block poison");
    BLOCKS_NONBLOCKING = cfg.getStringList("blocksNonBlocking", CATEGORY_GENERAL, BLOCKS_NONBLOCKING, "List of blocks that don't block poison");
}
 
开发者ID:McJty,项目名称:needtobreath,代码行数:6,代码来源:Config.java

示例14: initJellyBeanConfig

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
private static void initJellyBeanConfig(Configuration cfg)
{
	cfg.addCustomCategoryComment(catJellyBeans, "Jelly bean effect duration (in ticks)");

	jellybean_duration_generic = cfg.getInt("duration_generic", catJellyBeans, jellybean_duration_generic, 0, 600, "Duration for all jelly beans");
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:7,代码来源:Config.java

示例15: init

import net.minecraftforge.common.config.Configuration; //导入方法依赖的package包/类
public static void init(FMLPreInitializationEvent event) {
	config = new Configuration(event.getSuggestedConfigurationFile());

	config.load();

	config.addCustomCategoryComment("Drops", "Tweaks for leaf drops\n Drop chances are 1/n. Fortune decrements are how much it changes for each level of fortune.");
	oakChance = config.getInt("oakSeedChance", "Drops", 30, 1, 32767, "");
	birchChance = config.getInt("birchSeedChance", "Drops", 30, 1, 32767, "");
	spruceChance = config.getInt("spruceSeedChance", "Drops", 30, 1, 32767, "");
	jungleChance = config.getInt("jungleSeedChance", "Drops", 60, 1, 32767, "");
	acaciaChance = config.getInt("acaciaSeedChance", "Drops", 30, 1, 32767, "");
	darkoakChance = config.getInt("darkoakSeedChance", "Drops", 30, 1, 32767, "");
	appleChance = config.getInt("appleChance", "Drops", 6, 1, 32767, "");
	mapleChance = config.getInt("mapleSeedChance", "Drops", 30, 1, 32767, "");
	pineChance = config.getInt("pineSeedChance", "Drops", 27, 1, 32767, "");
	willowChance = config.getInt("willowSeedChance", "Drops", 52, 1, 32767, "");
	yewChance = config.getInt("yewSeedChance", "Drops", 24, 1, 32767, "");
	ebonyChance = config.getInt("ebonySeedChance", "Drops", 27, 1, 32767, "");
	firChance = config.getInt("firSeedChance", "Drops", 34, 1, 32767, "");
	bambooChance = config.getInt("bambooSeedChance", "Drops", 10, 1, 32767, "");
	rubberChance = config.getInt("rubberSeedChance", "Drops", 38, 1, 32767, "");
	goldenDropChance = config.getInt("goldenAppleChance", "Drops", 80, 1, 32767, "");
	goldenDropFortuneDecrement = config.getInt("goldenAppleFortuneDecrement", "Drops", 60, 1, 32767, "Must be less than the chance");
	goldenDropMinChance = config.getInt("goldenAppleMinChance", "Drops", 400, 1, 32767, "Must be less than the chance");
	appleDropFortuneDecrement = config.getInt("appleFortuneDecrement", "Drops", 2, 1, 32767, "Must be less than the chance");
	appleDropMinChance = config.getInt("appleMinChance", "Drops", 5, 1, 32767, "Must be less than the chance");
	seedDropFortuneDecrement = config.getInt("seedFortuneDecrement", "Drops", 2, 1, 32767, "Must be less than every seed chance. Effects all tree seed chances");
	seedDropMinChance = config.getInt("seedFortuneDecrement", "Drops", 10, 1, 32767, "Must be less than every seed chance. Effects all tree seed chances");
	removeAppleDrops = config.getBoolean("removeAppleDrops", "Drops", true, "Make apple trees the only natural source of apples besides loot");
	config.addCustomCategoryComment("Generation", "Tweaks for tree generation");
	appleFruitingChance = config.getInt("appleFruitingChance", "Drops", 8, 1, 32767, "");
	appleFruitingGenChance = config.getInt("appleFruitingGenerationChance", "Drops", 12, 1, 32767, "");
	config.addCustomCategoryComment("Misc", "Misc Tweaks");
	numStairs = config.getInt("NumStairsCrafting", "Misc", 4, 1, 8, "");
	retrieveSaplingsMode = config.getInt("goldenAppleChance", "Misc", 1, 0, 2, "0: Can't get sapling items normally/n1:Shear or silktouch a sapling block/n 2:Place a seed in a crafting grid");
	//can't get saplings
	//shear or silktouch sapling block
	//seed in crafting grid
	allowBonemealFruitSaplings = config.getBoolean("allowBonemealFruitSaplings", "Drops", true, "Allow fruit trees to be bonemealed");
	config.save();
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:Got-Wood,代码行数:42,代码来源:ConfigurationHandler.java


注:本文中的net.minecraftforge.common.config.Configuration.addCustomCategoryComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。