Added a config option to disable references.

This commit is contained in:
Vasco Lavos committed 2014-06-08 19:29:46 +01:00
1 parent 30025608b5
commit e33166f381
2 files changed
+11 -4

No files matched your search

@@ -30,6 +30,7 @@ public final class ConfigHandler {
public static double flowerParticleFrequency = 0.75F;
public static boolean blockBreakParticles = true;
public static boolean blockBreakParticlesTool = true;
public static boolean referencesEnabled = true;
public static boolean versionCheckEnabled = true;
public static int spreaderPositionShift = 1;
@@ -73,6 +74,9 @@ public final class ConfigHandler {
desc = "Set to false to remove the block breaking particles from the Mana Shatterer, as there can be a good amount in higher levels.";
blockBreakParticlesTool = loadPropBool("blockBreakingParticlesTool.enabled", desc, blockBreakParticlesTool);
desc = "Set to false to disable the references in flower tooltips. (You monster D:)";
referencesEnabled = loadPropBool("references.enabled", desc, referencesEnabled);
desc = "Set to false to disable checking and alerting when new Botania versions come out.";
versionCheckEnabled = loadPropBool("versionChecking.enabled", desc, versionCheckEnabled);
@@ -26,6 +26,7 @@ import vazkii.botania.api.subtile.SubTileEntity;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.block.tile.TileSpecialFlower;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.lib.LibBlockNames;
@@ -66,10 +67,12 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
String refUnlocalized = "tile." + LibResources.PREFIX_MOD + LibBlockNames.SPECIAL_FLOWER_PREFIX + getType(par1ItemStack) + ".reference";
String refLocalized = StatCollector.translateToLocal(refUnlocalized);
if(!refLocalized.equals(refUnlocalized))
par3List.add(EnumChatFormatting.ITALIC + refLocalized);
if(ConfigHandler.referencesEnabled) {
String refUnlocalized = "tile." + LibResources.PREFIX_MOD + LibBlockNames.SPECIAL_FLOWER_PREFIX + getType(par1ItemStack) + ".reference";
String refLocalized = StatCollector.translateToLocal(refUnlocalized);
if(!refLocalized.equals(refUnlocalized))
par3List.add(EnumChatFormatting.ITALIC + refLocalized);
}
}
public static String getType(ItemStack stack) {