mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 20:52:20 +00:00
Toned down particles in worldgen flowers and added a config option for it.
This commit is contained in:
1 parent
d704f06216
commit
c6f68e9c40
2 files changed
+34
-21
No files matched your search
@@ -32,6 +32,7 @@ import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
@@ -93,7 +94,8 @@ public class BlockModFlower extends BlockFlower implements ILexiconable {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
float[] color = EntitySheep.fleeceColorTable[meta];
|
||||
|
||||
Botania.proxy.sparkleFX(par1World, par2 + 0.3 + par5Random.nextFloat() * 0.5, par3 + 0.5 + par5Random.nextFloat() * 0.5, par4 + 0.3 + par5Random.nextFloat() * 0.5, color[0], color[1], color[2], par5Random.nextFloat(), 5);
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency)
|
||||
Botania.proxy.sparkleFX(par1World, par2 + 0.3 + par5Random.nextFloat() * 0.5, par3 + 0.5 + par5Random.nextFloat() * 0.5, par4 + 0.3 + par5Random.nextFloat() * 0.5, color[0], color[1], color[2], par5Random.nextFloat(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,13 +20,14 @@ public final class ConfigHandler {
|
||||
|
||||
private static Configuration config;
|
||||
|
||||
public static boolean useShaders = false;
|
||||
public static boolean lexiconRotatingItems = true;
|
||||
public static boolean subtlePowerSystem = false;
|
||||
public static boolean staticWandBeam = false;
|
||||
public static boolean boundBlockWireframe = true;
|
||||
public static boolean lexicon3dModel = true;
|
||||
public static boolean oldPylonModel = false;
|
||||
public static boolean useShaders = false;
|
||||
public static double flowerParticleFrequency = 0.75F;
|
||||
|
||||
public static int flowerQuantity = 3;
|
||||
public static int flowerDensity = 32;
|
||||
@@ -35,27 +36,31 @@ public final class ConfigHandler {
|
||||
config = new Configuration(configFile);
|
||||
|
||||
config.load();
|
||||
|
||||
String desc = "Set to false to disable the rotating items in the petal and rune entries in the Lexica Botania.";
|
||||
lexiconRotatingItems = loadPropBool("lexicon.enable.rotatingItems", desc, true);
|
||||
|
||||
desc = "Set to true to set the power system's particles to be a lot more subtle. Good for low-end systems, if the particles are causing lag.";
|
||||
subtlePowerSystem = loadPropBool("powerSystem.subtle", desc, false);
|
||||
|
||||
desc = "Set to true to use a static wand beam that shows every single position of the burst, similar to the way it used to work on old botania versions. Warning: Disabled by default because it may be laggy.";
|
||||
staticWandBeam = loadPropBool("wandBeam.static", desc, false);
|
||||
|
||||
desc = "Set to false to disable the wireframe when looking a block bound to something (spreaders, flowers, etc).";
|
||||
boundBlockWireframe = loadPropBool("boundBlock.wireframe.enabled", desc, true);
|
||||
|
||||
desc = "Set to false to disabled the animated 3D render for the lexica botania";
|
||||
lexicon3dModel = loadPropBool("lexicon.render.3D", desc, true);
|
||||
|
||||
desc = "Set to true to use the old (non-.obj, pre beta18) pylon model";
|
||||
oldPylonModel = loadPropBool("pylonModel.old", desc, false);
|
||||
String desc;
|
||||
|
||||
desc = "Set to false to disable the use of shaders for some of the mod's renders.";
|
||||
useShaders = loadPropBool("shaders.enabled", desc, true);
|
||||
useShaders = loadPropBool("shaders.enabled", desc, useShaders);
|
||||
|
||||
desc = "Set to false to disable the rotating items in the petal and rune entries in the Lexica Botania.";
|
||||
lexiconRotatingItems = loadPropBool("lexicon.enable.rotatingItems", desc, lexiconRotatingItems);
|
||||
|
||||
desc = "Set to true to set the power system's particles to be a lot more subtle. Good for low-end systems, if the particles are causing lag.";
|
||||
subtlePowerSystem = loadPropBool("powerSystem.subtle", desc, subtlePowerSystem);
|
||||
|
||||
desc = "Set to true to use a static wand beam that shows every single position of the burst, similar to the way it used to work on old botania versions. Warning: Disabled by default because it may be laggy.";
|
||||
staticWandBeam = loadPropBool("wandBeam.static", desc, staticWandBeam);
|
||||
|
||||
desc = "Set to false to disable the wireframe when looking a block bound to something (spreaders, flowers, etc).";
|
||||
boundBlockWireframe = loadPropBool("boundBlock.wireframe.enabled", desc, boundBlockWireframe);
|
||||
|
||||
desc = "Set to false to disabled the animated 3D render for the lexica botania";
|
||||
lexicon3dModel = loadPropBool("lexicon.render.3D", desc, lexicon3dModel);
|
||||
|
||||
desc = "Set to true to use the old (non-.obj, pre beta18) pylon model";
|
||||
oldPylonModel = loadPropBool("pylonModel.old", desc, oldPylonModel);
|
||||
|
||||
desc = "The frequency in which particles spawn from normal (worldgen) mystical flowers";
|
||||
flowerParticleFrequency = loadPropDouble("flowerParticles.frequency", desc, flowerParticleFrequency);
|
||||
|
||||
flowerQuantity = loadPropInt("worldgen.flower.quantity", null, 3);
|
||||
flowerDensity = loadPropInt("worldgen.flower.density", null, 32);
|
||||
@@ -69,6 +74,12 @@ public final class ConfigHandler {
|
||||
return prop.getInt(default_);
|
||||
}
|
||||
|
||||
public static double loadPropDouble(String propName, String desc, double default_) {
|
||||
Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
|
||||
prop.comment = desc;
|
||||
return prop.getDouble(default_);
|
||||
}
|
||||
|
||||
public static boolean loadPropBool(String propName, String desc, boolean default_) {
|
||||
Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
|
||||
prop.comment = desc;
|
||||
|
||||
Reference in new issue
Block a user