mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Fix #743 Add config option for pollination on Vanilla trees
This commit is contained in:
1 parent
0def8c3f34
commit
045a3a9ccd
3 files changed
+11
-6
No files matched your search
@@ -57,6 +57,7 @@ public class Config {
|
||||
|
||||
// Genetics
|
||||
public static boolean clearInvalidChromosomes = false;
|
||||
public static boolean pollinateVanillaTrees = true;
|
||||
public static float researchMutationBoostMultiplier = 1.5f;
|
||||
public static float maxResearchMutationBoostPercent = 5.0f;
|
||||
|
||||
@@ -177,7 +178,7 @@ public class Config {
|
||||
|
||||
private static void loadNewConfigCommon(File configFileCommon) {
|
||||
|
||||
configCommon = new LocalizedConfiguration(configFileCommon, "1.0.0");
|
||||
configCommon = new LocalizedConfiguration(configFileCommon, "1.1.0");
|
||||
|
||||
gameMode = configCommon.getStringLocalized("difficulty", "game.mode", "EASY", new String[]{"OP, EASY, NORMAL, HARD"});
|
||||
|
||||
@@ -243,6 +244,7 @@ public class Config {
|
||||
}
|
||||
|
||||
clearInvalidChromosomes = configCommon.getBooleanLocalized("genetics", "clear.invalid.chromosomes", clearInvalidChromosomes);
|
||||
pollinateVanillaTrees = configCommon.getBooleanLocalized("genetics", "pollinate.vanilla.trees", pollinateVanillaTrees);
|
||||
researchMutationBoostMultiplier = configCommon.getFloatLocalized("genetics.research.boost", "multiplier", researchMutationBoostMultiplier, 1.0f, 1000.f);
|
||||
maxResearchMutationBoostPercent = configCommon.getFloatLocalized("genetics.research.boost", "max.percent", maxResearchMutationBoostPercent, 0.0f, 100.0f);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import forestry.api.lepidopterology.IButterflyNursery;
|
||||
import forestry.arboriculture.genetics.CheckPollinatable;
|
||||
import forestry.arboriculture.genetics.CheckPollinatableTree;
|
||||
import forestry.arboriculture.genetics.ICheckPollinatable;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.genetics.ItemGE;
|
||||
|
||||
public class GeneticsUtil {
|
||||
@@ -118,10 +119,12 @@ public class GeneticsUtil {
|
||||
return (IPollinatable) tile;
|
||||
}
|
||||
|
||||
ITree pollen = getErsatzPollen(world, x, y, z);
|
||||
if (pollen != null) {
|
||||
pollen.setLeaves(world, owner, x, y, z);
|
||||
return (IPollinatable) world.getTileEntity(x, y, z);
|
||||
if (Config.pollinateVanillaTrees) {
|
||||
ITree pollen = getErsatzPollen(world, x, y, z);
|
||||
if (pollen != null) {
|
||||
pollen.setLeaves(world, owner, x, y, z);
|
||||
return (IPollinatable) world.getTileEntity(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user