diff --git a/src/main/java/forestry/apiculture/BeekeepingLogic.java b/src/main/java/forestry/apiculture/BeekeepingLogic.java index e800e8226..38522d803 100755 --- a/src/main/java/forestry/apiculture/BeekeepingLogic.java +++ b/src/main/java/forestry/apiculture/BeekeepingLogic.java @@ -381,11 +381,16 @@ public class BeekeepingLogic implements IBeekeepingLogic { housing.onQueenDeath(getQueen()); // Princess - IBee heiress = queen.spawnPrincess(housing); - if (heiress != null) { - ItemStack princess = PluginApiculture.beeInterface.getMemberStack(heiress, EnumBeeType.PRINCESS.ordinal()); - breedingTracker.registerPrincess(heiress); - offspring.push(princess); + boolean secondPrincess = this.housing.getWorld().rand.nextInt(100) < PluginApiculture.getSecondPrincessChance(); + int count = secondPrincess ? 2 : 1; + while (count > 0) { + count--; + IBee heiress = queen.spawnPrincess(housing); + if (heiress != null) { + ItemStack princess = PluginApiculture.beeInterface.getMemberStack(heiress, EnumBeeType.PRINCESS.ordinal()); + breedingTracker.registerPrincess(heiress); + offspring.push(princess); + } } // Drones diff --git a/src/main/java/forestry/plugins/PluginApiculture.java b/src/main/java/forestry/plugins/PluginApiculture.java index 8abb45808..6a50de358 100644 --- a/src/main/java/forestry/plugins/PluginApiculture.java +++ b/src/main/java/forestry/plugins/PluginApiculture.java @@ -164,6 +164,7 @@ public class PluginApiculture extends ForestryPlugin { private static final String CONFIG_CATEGORY = "apiculture"; private Configuration apicultureConfig; public static String beekeepingMode = "NORMAL"; + private static int secondPrincessChance = 0; public static int ticksPerBeeWorkCycle = 550; public static boolean apiarySideSensitive = false; public static boolean fancyRenderedBees = false; @@ -290,6 +291,10 @@ public class PluginApiculture extends ForestryPlugin { beekeepingMode = property.value.trim(); Proxies.log.finer("Beekeeping mode read from config: " + beekeepingMode); + Property secondPrincess = apicultureConfig.get("beekeeping.secondprincess", CONFIG_CATEGORY, secondPrincessChance); + secondPrincess.comment = "percent chance of second princess drop, for limited/skyblock maps."; + secondPrincessChance = Integer.parseInt(secondPrincess.value); + property = apicultureConfig.get("beekeeping.flowers.custom", CONFIG_CATEGORY, ""); property.comment = "add additional flower blocks for apiaries here in the format id:meta. separate blocks using ';'. will be treated like vanilla flowers. not recommended for flowers implemented as tile entities."; parseAdditionalFlowers(property.value, FlowerManager.plainFlowers); @@ -1204,6 +1209,10 @@ public class PluginApiculture extends ForestryPlugin { beeInterface.registerTemplate(BeeTemplates.getPhantasmalTemplate()); } + public static int getSecondPrincessChance() { + return secondPrincessChance; + } + private void parseAdditionalFlowers(String list, ArrayList target) { String[] parts = list.split("[;]+");