Skip to content

Commit

Permalink
Updated config
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Dec 13, 2023
1 parent b234105 commit fe289c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit fe289c9

Please sign in to comment.