Add adjustable breeding cooldown to config

This commit is contained in:
montlikadani
2025-01-09 20:08:21 -08:00
committed by granny
parent 6b687c2370
commit 76aea0cb3c
5 changed files with 89 additions and 138 deletions

View File

@@ -105,6 +105,7 @@ public class PurpurWorldConfig {
public double tridentLoyaltyVoidReturnHeight = 0.0D;
public boolean entitiesCanUsePortals = true;
public int raidCooldownSeconds = 0;
public int animalBreedingCooldownSeconds = 0;
private void miscGameplayMechanicsSettings() {
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
@@ -113,6 +114,7 @@ public class PurpurWorldConfig {
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds);
animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds);
}
public int daytimeTicks = 12000;

View File

@@ -49,6 +49,7 @@ public class PurpurCommand extends Command {
PurpurConfig.init((File) console.options.valueOf("purpur-settings"));
for (ServerLevel level : console.getAllLevels()) {
level.purpurConfig.init();
level.resetBreedingCooldowns(); // Purpur - Add adjustable breeding cooldown to config
}
console.server.reloadCount++;