mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
#19 add config option to disable butterfly pollination
This commit is contained in:
1 parent
08a9badc54
commit
0f61cea75e
2 files changed
+11
-1
No files matched your search
@@ -69,6 +69,7 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
private Configuration config;
|
||||
public static int spawnConstraint = 100;
|
||||
public static int entityConstraint = 1000;
|
||||
private static boolean allowPollination = true;
|
||||
public static IClassification geometridae;
|
||||
public static IClassification saturniidae;
|
||||
public static IClassification pieridae;
|
||||
@@ -110,6 +111,10 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
property.comment = "determines the global butterfly entity count above which butterflies will stay in item form and will not take flight anymore.";
|
||||
entityConstraint = Integer.parseInt(property.value);
|
||||
|
||||
property = config.get("entities.pollination.allowed", CONFIG_CATEGORY, allowPollination);
|
||||
property.comment = "determines whether butterflies can pollinate leaves.";
|
||||
allowPollination = Boolean.parseBoolean(property.value);
|
||||
|
||||
config.save();
|
||||
|
||||
PluginCore.rootCommand.addChildCommand(new CommandButterfly());
|
||||
@@ -324,4 +329,8 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return new GuiHandlerLepidopterology();
|
||||
}
|
||||
|
||||
public static boolean isPollinationAllowed() {
|
||||
return allowPollination;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user