add frog breeding time

This commit is contained in:
BillyGalbreath
2022-06-12 06:36:56 -05:00
parent dfb253a429
commit e869e89274
39 changed files with 381 additions and 358 deletions

View File

@@ -315,6 +315,24 @@ index a80a7d460051a39fe805ae669b4586fb42e46943..6d444248b9e283e31d5777d450a52643
// Purpur end
@Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index 9e17e21a48892686e94a1c21b636695ab84eb7cd..ca0051d46a8ebe614d143339f229a3cce73b0bb3 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -93,6 +93,13 @@ public class Frog extends Animal {
this.maxUpStep = 1.0F;
}
+ // Purpur start
+ @Override
+ public int getPurpurBreedTime() {
+ return this.level.purpurConfig.frogBreedingTicks;
+ }
+ // Purpur end
+
@Override
protected Brain.Provider<Frog> brainProvider() {
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index aa2abe00478b002fc90166441d8b89c7046ed022..47c08d7f3e30aa335fb7c43179679b6ae9f23952 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -476,7 +494,7 @@ index e99ffbf30652e188e88f8e17ed41d39ff25c9f73..c335a32832c6eef95658fbf632b943bb
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc288c9ad8 100644
index 7c203f8b0120d07263c0a96422a69173daebd89e..ac3b0b027c6a9a625d5b54fc2db59339a11510d0 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -481,10 +481,12 @@ public class PurpurWorldConfig {
@@ -580,15 +598,20 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void foxSettings() {
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
@@ -830,6 +843,7 @@ public class PurpurWorldConfig {
@@ -830,6 +843,12 @@ public class PurpurWorldConfig {
}
foxMaxHealth = getDouble("mobs.fox.attributes.max_health", foxMaxHealth);
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
+ foxBreedingTicks = getInt("mobs.fox.breeding-delay-ticks", foxBreedingTicks);
+ }
+
+ public int frogBreedingTicks = 6000;
+ private void frogSettings() {
+ frogBreedingTicks = getInt("mobs.frog.breeding-delay-ticks", frogBreedingTicks);
}
public boolean ghastRidable = false;
@@ -897,11 +911,13 @@ public class PurpurWorldConfig {
@@ -897,11 +916,13 @@ public class PurpurWorldConfig {
public boolean goatRidableInWater = false;
public boolean goatControllable = true;
public double goatMaxHealth = 10.0D;
@@ -602,7 +625,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean guardianRidable = false;
@@ -922,6 +938,7 @@ public class PurpurWorldConfig {
@@ -922,6 +943,7 @@ public class PurpurWorldConfig {
public boolean hoglinRidableInWater = false;
public boolean hoglinControllable = true;
public double hoglinMaxHealth = 40.0D;
@@ -610,7 +633,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void hoglinSettings() {
hoglinRidable = getBoolean("mobs.hoglin.ridable", hoglinRidable);
hoglinRidableInWater = getBoolean("mobs.hoglin.ridable-in-water", hoglinRidableInWater);
@@ -932,6 +949,7 @@ public class PurpurWorldConfig {
@@ -932,6 +954,7 @@ public class PurpurWorldConfig {
set("mobs.hoglin.attributes.max_health", oldValue);
}
hoglinMaxHealth = getDouble("mobs.hoglin.attributes.max_health", hoglinMaxHealth);
@@ -618,7 +641,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean horseRidableInWater = false;
@@ -941,6 +959,7 @@ public class PurpurWorldConfig {
@@ -941,6 +964,7 @@ public class PurpurWorldConfig {
public double horseJumpStrengthMax = 1.0D;
public double horseMovementSpeedMin = 0.1125D;
public double horseMovementSpeedMax = 0.3375D;
@@ -626,7 +649,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void horseSettings() {
horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
if (PurpurConfig.version < 10) {
@@ -956,6 +975,7 @@ public class PurpurWorldConfig {
@@ -956,6 +980,7 @@ public class PurpurWorldConfig {
horseJumpStrengthMax = getDouble("mobs.horse.attributes.jump_strength.max", horseJumpStrengthMax);
horseMovementSpeedMin = getDouble("mobs.horse.attributes.movement_speed.min", horseMovementSpeedMin);
horseMovementSpeedMax = getDouble("mobs.horse.attributes.movement_speed.max", horseMovementSpeedMax);
@@ -634,7 +657,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean huskRidable = false;
@@ -1033,6 +1053,7 @@ public class PurpurWorldConfig {
@@ -1033,6 +1058,7 @@ public class PurpurWorldConfig {
public double llamaJumpStrengthMax = 0.5D;
public double llamaMovementSpeedMin = 0.175D;
public double llamaMovementSpeedMax = 0.175D;
@@ -642,7 +665,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void llamaSettings() {
llamaRidable = getBoolean("mobs.llama.ridable", llamaRidable);
llamaRidableInWater = getBoolean("mobs.llama.ridable-in-water", llamaRidableInWater);
@@ -1050,6 +1071,7 @@ public class PurpurWorldConfig {
@@ -1050,6 +1076,7 @@ public class PurpurWorldConfig {
llamaJumpStrengthMax = getDouble("mobs.llama.attributes.jump_strength.max", llamaJumpStrengthMax);
llamaMovementSpeedMin = getDouble("mobs.llama.attributes.movement_speed.min", llamaMovementSpeedMin);
llamaMovementSpeedMax = getDouble("mobs.llama.attributes.movement_speed.max", llamaMovementSpeedMax);
@@ -650,7 +673,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean magmaCubeRidable = false;
@@ -1078,6 +1100,7 @@ public class PurpurWorldConfig {
@@ -1078,6 +1105,7 @@ public class PurpurWorldConfig {
public boolean mooshroomRidableInWater = false;
public boolean mooshroomControllable = true;
public double mooshroomMaxHealth = 10.0D;
@@ -658,7 +681,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void mooshroomSettings() {
mooshroomRidable = getBoolean("mobs.mooshroom.ridable", mooshroomRidable);
mooshroomRidableInWater = getBoolean("mobs.mooshroom.ridable-in-water", mooshroomRidableInWater);
@@ -1088,6 +1111,7 @@ public class PurpurWorldConfig {
@@ -1088,6 +1116,7 @@ public class PurpurWorldConfig {
set("mobs.mooshroom.attributes.max_health", oldValue);
}
mooshroomMaxHealth = getDouble("mobs.mooshroom.attributes.max_health", mooshroomMaxHealth);
@@ -666,7 +689,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean muleRidableInWater = false;
@@ -1097,6 +1121,7 @@ public class PurpurWorldConfig {
@@ -1097,6 +1126,7 @@ public class PurpurWorldConfig {
public double muleJumpStrengthMax = 0.5D;
public double muleMovementSpeedMin = 0.175D;
public double muleMovementSpeedMax = 0.175D;
@@ -674,7 +697,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void muleSettings() {
muleRidableInWater = getBoolean("mobs.mule.ridable-in-water", muleRidableInWater);
if (PurpurConfig.version < 10) {
@@ -1112,12 +1137,14 @@ public class PurpurWorldConfig {
@@ -1112,12 +1142,14 @@ public class PurpurWorldConfig {
muleJumpStrengthMax = getDouble("mobs.mule.attributes.jump_strength.max", muleJumpStrengthMax);
muleMovementSpeedMin = getDouble("mobs.mule.attributes.movement_speed.min", muleMovementSpeedMin);
muleMovementSpeedMax = getDouble("mobs.mule.attributes.movement_speed.max", muleMovementSpeedMax);
@@ -689,7 +712,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void ocelotSettings() {
ocelotRidable = getBoolean("mobs.ocelot.ridable", ocelotRidable);
ocelotRidableInWater = getBoolean("mobs.ocelot.ridable-in-water", ocelotRidableInWater);
@@ -1128,12 +1155,14 @@ public class PurpurWorldConfig {
@@ -1128,12 +1160,14 @@ public class PurpurWorldConfig {
set("mobs.ocelot.attributes.max_health", oldValue);
}
ocelotMaxHealth = getDouble("mobs.ocelot.attributes.max_health", ocelotMaxHealth);
@@ -704,7 +727,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void pandaSettings() {
pandaRidable = getBoolean("mobs.panda.ridable", pandaRidable);
pandaRidableInWater = getBoolean("mobs.panda.ridable-in-water", pandaRidableInWater);
@@ -1144,6 +1173,7 @@ public class PurpurWorldConfig {
@@ -1144,6 +1178,7 @@ public class PurpurWorldConfig {
set("mobs.panda.attributes.max_health", oldValue);
}
pandaMaxHealth = getDouble("mobs.panda.attributes.max_health", pandaMaxHealth);
@@ -712,7 +735,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean parrotRidable = false;
@@ -1239,6 +1269,7 @@ public class PurpurWorldConfig {
@@ -1239,6 +1274,7 @@ public class PurpurWorldConfig {
public boolean pigControllable = true;
public double pigMaxHealth = 10.0D;
public boolean pigGiveSaddleBack = false;
@@ -720,7 +743,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void pigSettings() {
pigRidable = getBoolean("mobs.pig.ridable", pigRidable);
pigRidableInWater = getBoolean("mobs.pig.ridable-in-water", pigRidableInWater);
@@ -1250,6 +1281,7 @@ public class PurpurWorldConfig {
@@ -1250,6 +1286,7 @@ public class PurpurWorldConfig {
}
pigMaxHealth = getDouble("mobs.pig.attributes.max_health", pigMaxHealth);
pigGiveSaddleBack = getBoolean("mobs.pig.give-saddle-back", pigGiveSaddleBack);
@@ -728,7 +751,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean piglinRidable = false;
@@ -1306,6 +1338,7 @@ public class PurpurWorldConfig {
@@ -1306,6 +1343,7 @@ public class PurpurWorldConfig {
public double polarBearMaxHealth = 30.0D;
public String polarBearBreedableItemString = "";
public Item polarBearBreedableItem = null;
@@ -736,7 +759,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void polarBearSettings() {
polarBearRidable = getBoolean("mobs.polar_bear.ridable", polarBearRidable);
polarBearRidableInWater = getBoolean("mobs.polar_bear.ridable-in-water", polarBearRidableInWater);
@@ -1319,6 +1352,7 @@ public class PurpurWorldConfig {
@@ -1319,6 +1357,7 @@ public class PurpurWorldConfig {
polarBearBreedableItemString = getString("mobs.polar_bear.breedable-item", polarBearBreedableItemString);
Item item = Registry.ITEM.get(new ResourceLocation(polarBearBreedableItemString));
if (item != Items.AIR) polarBearBreedableItem = item;
@@ -744,7 +767,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean pufferfishRidable = false;
@@ -1341,6 +1375,7 @@ public class PurpurWorldConfig {
@@ -1341,6 +1380,7 @@ public class PurpurWorldConfig {
public double rabbitMaxHealth = 3.0D;
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
@@ -752,7 +775,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void rabbitSettings() {
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
@@ -1353,6 +1388,7 @@ public class PurpurWorldConfig {
@@ -1353,6 +1393,7 @@ public class PurpurWorldConfig {
rabbitMaxHealth = getDouble("mobs.rabbit.attributes.max_health", rabbitMaxHealth);
rabbitNaturalToast = getDouble("mobs.rabbit.spawn-toast-chance", rabbitNaturalToast);
rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller);
@@ -760,7 +783,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean ravagerRidable = false;
@@ -1389,6 +1425,7 @@ public class PurpurWorldConfig {
@@ -1389,6 +1430,7 @@ public class PurpurWorldConfig {
public boolean sheepRidableInWater = false;
public boolean sheepControllable = true;
public double sheepMaxHealth = 8.0D;
@@ -768,7 +791,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void sheepSettings() {
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
@@ -1399,6 +1436,7 @@ public class PurpurWorldConfig {
@@ -1399,6 +1441,7 @@ public class PurpurWorldConfig {
set("mobs.sheep.attributes.max_health", oldValue);
}
sheepMaxHealth = getDouble("mobs.sheep.attributes.max_health", sheepMaxHealth);
@@ -776,7 +799,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean shulkerRidable = false;
@@ -1574,6 +1612,7 @@ public class PurpurWorldConfig {
@@ -1574,6 +1617,7 @@ public class PurpurWorldConfig {
public boolean striderRidableInWater = false;
public boolean striderControllable = true;
public double striderMaxHealth = 20.0D;
@@ -784,7 +807,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void striderSettings() {
striderRidable = getBoolean("mobs.strider.ridable", striderRidable);
striderRidableInWater = getBoolean("mobs.strider.ridable-in-water", striderRidableInWater);
@@ -1584,6 +1623,7 @@ public class PurpurWorldConfig {
@@ -1584,6 +1628,7 @@ public class PurpurWorldConfig {
set("mobs.strider.attributes.max_health", oldValue);
}
striderMaxHealth = getDouble("mobs.strider.attributes.max_health", striderMaxHealth);
@@ -792,7 +815,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean traderLlamaRidable = false;
@@ -1595,6 +1635,7 @@ public class PurpurWorldConfig {
@@ -1595,6 +1640,7 @@ public class PurpurWorldConfig {
public double traderLlamaJumpStrengthMax = 0.5D;
public double traderLlamaMovementSpeedMin = 0.175D;
public double traderLlamaMovementSpeedMax = 0.175D;
@@ -800,7 +823,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void traderLlamaSettings() {
traderLlamaRidable = getBoolean("mobs.trader_llama.ridable", traderLlamaRidable);
traderLlamaRidableInWater = getBoolean("mobs.trader_llama.ridable-in-water", traderLlamaRidableInWater);
@@ -1612,6 +1653,7 @@ public class PurpurWorldConfig {
@@ -1612,6 +1658,7 @@ public class PurpurWorldConfig {
traderLlamaJumpStrengthMax = getDouble("mobs.trader_llama.attributes.jump_strength.max", traderLlamaJumpStrengthMax);
traderLlamaMovementSpeedMin = getDouble("mobs.trader_llama.attributes.movement_speed.min", traderLlamaMovementSpeedMin);
traderLlamaMovementSpeedMax = getDouble("mobs.trader_llama.attributes.movement_speed.max", traderLlamaMovementSpeedMax);
@@ -808,7 +831,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean tropicalFishRidable = false;
@@ -1632,6 +1674,7 @@ public class PurpurWorldConfig {
@@ -1632,6 +1679,7 @@ public class PurpurWorldConfig {
public boolean turtleRidableInWater = false;
public boolean turtleControllable = true;
public double turtleMaxHealth = 30.0D;
@@ -816,7 +839,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void turtleSettings() {
turtleRidable = getBoolean("mobs.turtle.ridable", turtleRidable);
turtleRidableInWater = getBoolean("mobs.turtle.ridable-in-water", turtleRidableInWater);
@@ -1642,6 +1685,7 @@ public class PurpurWorldConfig {
@@ -1642,6 +1690,7 @@ public class PurpurWorldConfig {
set("mobs.turtle.attributes.max_health", oldValue);
}
turtleMaxHealth = getDouble("mobs.turtle.attributes.max_health", turtleMaxHealth);
@@ -824,7 +847,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean vexRidable = false;
@@ -1671,6 +1715,7 @@ public class PurpurWorldConfig {
@@ -1671,6 +1720,7 @@ public class PurpurWorldConfig {
public boolean villagerFollowEmeraldBlock = false;
public boolean villagerCanBeLeashed = false;
public boolean villagerCanBreed = true;
@@ -832,7 +855,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1686,6 +1731,7 @@ public class PurpurWorldConfig {
@@ -1686,6 +1736,7 @@ public class PurpurWorldConfig {
villagerFollowEmeraldBlock = getBoolean("mobs.villager.follow-emerald-blocks", villagerFollowEmeraldBlock);
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
@@ -840,7 +863,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
}
public boolean vindicatorRidable = false;
@@ -1788,6 +1834,7 @@ public class PurpurWorldConfig {
@@ -1788,6 +1839,7 @@ public class PurpurWorldConfig {
public boolean wolfRidableInWater = false;
public boolean wolfControllable = true;
public double wolfMaxHealth = 8.0D;
@@ -848,7 +871,7 @@ index 7c203f8b0120d07263c0a96422a69173daebd89e..f2015098f6470a7f8ab37174138b84dc
private void wolfSettings() {
wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable);
wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater);
@@ -1798,6 +1845,7 @@ public class PurpurWorldConfig {
@@ -1798,6 +1850,7 @@ public class PurpurWorldConfig {
set("mobs.wolf.attributes.max_health", oldValue);
}
wolfMaxHealth = getDouble("mobs.wolf.attributes.max_health", wolfMaxHealth);