diff --git a/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java b/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java index 985c46206..9e7949472 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java @@ -18,9 +18,15 @@ public final class FriendsAndFoesConfig implements Config @Description("Generate copper golem area structure in villages") public boolean generateCopperGolemAreaStructure = true; - @Description("Occasionally generate copper golem in the center piece in the ancient cities") + @Description("Copper Golem area structure spawn chance") + public int copperGolemAreaStructureWeight = 1; + + @Description("Generate copper golem in the center piece in the ancient cities") public boolean generateCopperGolemInAncientCity = true; + @Description("Generate copper golem in the center piece in the ancient cities spawn chance") + public int copperGolemAncientCityCenterWeight = 10; + @Category("Glare") @Description("Enable") public boolean enableGlare = true; @@ -151,6 +157,9 @@ public final class FriendsAndFoesConfig implements Config @Description("Generate beekeeper area structure in villages") public boolean generateBeekeeperAreaStructure = true; + @Description("Beekeeper area structure spawn chance") + public int beekeeperAreaStructureWeight = 2; + @Override public String getName() { return FriendsAndFoes.MOD_ID; diff --git a/common/src/main/java/com/faboslav/friendsandfoes/mixin/StructurePoolMixin.java b/common/src/main/java/com/faboslav/friendsandfoes/mixin/StructurePoolMixin.java index 4461f4e50..bea4fe4b7 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/mixin/StructurePoolMixin.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/mixin/StructurePoolMixin.java @@ -48,31 +48,31 @@ private void friendsandfoes_addCustomStructures( ) { if (FriendsAndFoes.getConfig().generateBeekeeperAreaStructure) { if (Objects.equals(id.getPath(), "village/plains/houses")) { - addElement(FriendsAndFoes.makeStringID("village/plains/houses/plains_beekeeper_area"), 2, projection); + addElement(FriendsAndFoes.makeStringID("village/plains/houses/plains_beekeeper_area"), FriendsAndFoes.getConfig().beekeeperAreaStructureWeight, projection); } else if (Objects.equals(id.getPath(), "village/savanna/houses")) { - addElement(FriendsAndFoes.makeStringID("village/savanna/houses/savanna_beekeeper_area"), 2, projection); + addElement(FriendsAndFoes.makeStringID("village/savanna/houses/savanna_beekeeper_area"), FriendsAndFoes.getConfig().beekeeperAreaStructureWeight, projection); } else if (Objects.equals(id.getPath(), "village/taiga/houses")) { - addElement(FriendsAndFoes.makeStringID("village/taiga/houses/taiga_beekeeper_area"), 2, projection); + addElement(FriendsAndFoes.makeStringID("village/taiga/houses/taiga_beekeeper_area"), FriendsAndFoes.getConfig().beekeeperAreaStructureWeight, projection); } } if (FriendsAndFoes.getConfig().generateCopperGolemAreaStructure) { if (Objects.equals(id.getPath(), "village/desert/houses")) { - addElement(FriendsAndFoes.makeStringID("village/desert/houses/desert_copper_golem_area"), 1, projection); + addElement(FriendsAndFoes.makeStringID("village/desert/houses/desert_copper_golem_area"), FriendsAndFoes.getConfig().copperGolemAreaStructureWeight, projection); } else if (Objects.equals(id.getPath(), "village/plains/houses")) { - addElement(FriendsAndFoes.makeStringID("village/plains/houses/plains_copper_golem_area"), 1, projection); + addElement(FriendsAndFoes.makeStringID("village/plains/houses/plains_copper_golem_area"), FriendsAndFoes.getConfig().copperGolemAreaStructureWeight, projection); } else if (Objects.equals(id.getPath(), "village/savanna/houses")) { - addElement(FriendsAndFoes.makeStringID("village/savanna/houses/savanna_copper_golem_area"), 1, projection); + addElement(FriendsAndFoes.makeStringID("village/savanna/houses/savanna_copper_golem_area"), FriendsAndFoes.getConfig().copperGolemAreaStructureWeight, projection); } else if (Objects.equals(id.getPath(), "village/taiga/houses")) { - addElement(FriendsAndFoes.makeStringID("village/taiga/houses/taiga_copper_golem_area"), 1, projection); + addElement(FriendsAndFoes.makeStringID("village/taiga/houses/taiga_copper_golem_area"), FriendsAndFoes.getConfig().copperGolemAreaStructureWeight, projection); } } if (FriendsAndFoes.getConfig().generateCopperGolemInAncientCity) { if (Objects.equals(id.getPath(), "ancient_city/city_center")) { - addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_1"), 10, projection); - addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_2"), 10, projection); - addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_3"), 10, projection); + addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_1"), FriendsAndFoes.getConfig().copperGolemAncientCityCenterWeight, projection); + addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_2"), FriendsAndFoes.getConfig().copperGolemAncientCityCenterWeight, projection); + addElement(FriendsAndFoes.makeStringID("ancient_city/city_center/city_center_3"), FriendsAndFoes.getConfig().copperGolemAncientCityCenterWeight, projection); } } }