diff --git a/src/main/java/forestry/plugins/PluginLepidopterology.java b/src/main/java/forestry/plugins/PluginLepidopterology.java index 74a508d9b..d077fde44 100755 --- a/src/main/java/forestry/plugins/PluginLepidopterology.java +++ b/src/main/java/forestry/plugins/PluginLepidopterology.java @@ -60,6 +60,7 @@ public class PluginLepidopterology extends ForestryPlugin { public static int spawnConstraint = 100; public static int entityConstraint = 1000; private static boolean allowPollination = true; + public static boolean disableButterflyLeafSpawns = false; public static ItemRegistryLepidopterology items; public static BlockRegistryLepidopterology blocks; @@ -112,7 +113,8 @@ public class PluginLepidopterology extends ForestryPlugin { blocks.lepidopterology.init(); - TreeManager.treeRoot.registerLeafTickHandler(new ButterflySpawner()); + if (!PluginLepidopterology.disableButterflyLeafSpawns) + TreeManager.treeRoot.registerLeafTickHandler(new ButterflySpawner()); RecipeSorter.register( "forestry:lepidopterologymating", @@ -127,6 +129,8 @@ public class PluginLepidopterology extends ForestryPlugin { spawnConstraint = config.getIntLocalized("butterfly.entities", "spawn.limit", spawnConstraint, 0, 500); entityConstraint = config.getIntLocalized("butterfly.entities", "maximum", entityConstraint, 0, 5000); allowPollination = config.getBooleanLocalized("butterfly.entities", "pollination", allowPollination); + disableButterflyLeafSpawns = config + .getBooleanLocalized("butterfly.entities", "disable.leaf.spawns", disableButterflyLeafSpawns); config.save(); } diff --git a/src/main/resources/assets/forestry/lang/en_US.lang b/src/main/resources/assets/forestry/lang/en_US.lang index d73fb3068..ee6b85589 100644 --- a/src/main/resources/assets/forestry/lang/en_US.lang +++ b/src/main/resources/assets/forestry/lang/en_US.lang @@ -1684,6 +1684,8 @@ for.config.butterfly.entities.maximum=Butterfly Maximum for.config.butterfly.entities.maximum.comment=New butterflies will stay in item form and will not take flight once this limit is reached. for.config.butterfly.entities.pollination=Butterfly Pollination for.config.butterfly.entities.pollination.comment=Allow butterflies to pollinate leaves. +for.config.butterfly.entities.disable.leaf.spawns=Disable Butterfly Leaf Spawns +for.config.butterfly.entities.disable.leaf.spawns.comment=Prevent random butterflies from autonomously spawning from Forestry leaves. for.config.backpacks.item.stacks.format=Add itemStacks for the %s's backpack here in the format 'modid:name:meta'. For wildcard metadata the format is 'modid:name'. for.config.backpacks.ore.dict.format=Add ore dictionary names for the %s's backpack here in the format 'oreDictName'.