Add configurable minecart speed and move controllable minecart options

This commit is contained in:
BillyGalbreath
2021-04-27 17:32:43 -05:00
parent 3dce9755f3
commit 9fd776eb9a
135 changed files with 477 additions and 448 deletions

View File

@@ -1407,10 +1407,10 @@ index 90cbef7fe8803295f82bddd6709fdf303aedcaba..b84916c0c58fd208ef5547299f8db846
@Nullable
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1633aa1a3 100644
index 7ddb0119baa33a6641599fce7c7112d05dd7fb5d..464d6e35970b42319934d74a1f41076cf4f8b784 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -496,30 +496,58 @@ public class PurpurWorldConfig {
@@ -530,30 +530,58 @@ public class PurpurWorldConfig {
public boolean batRidable = false;
public boolean batRidableInWater = false;
public double batMaxY = 256D;
@@ -1469,7 +1469,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean catRidable = false;
@@ -528,6 +556,7 @@ public class PurpurWorldConfig {
@@ -562,6 +590,7 @@ public class PurpurWorldConfig {
public int catSpawnSwampHutScanRange = 16;
public int catSpawnVillageScanRange = 48;
public int catBreedingTicks = 6000;
@@ -1477,7 +1477,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void catSettings() {
catRidable = getBoolean("mobs.cat.ridable", catRidable);
catRidableInWater = getBoolean("mobs.cat.ridable-in-water", catRidableInWater);
@@ -535,51 +564,92 @@ public class PurpurWorldConfig {
@@ -569,51 +598,92 @@ public class PurpurWorldConfig {
catSpawnSwampHutScanRange = getInt("mobs.cat.scan-range-for-other-cats.swamp-hut", catSpawnSwampHutScanRange);
catSpawnVillageScanRange = getInt("mobs.cat.scan-range-for-other-cats.village", catSpawnVillageScanRange);
catBreedingTicks = getInt("mobs.cat.breeding-delay-ticks", catBreedingTicks);
@@ -1570,7 +1570,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean dolphinRidable = false;
@@ -587,19 +657,45 @@ public class PurpurWorldConfig {
@@ -621,19 +691,45 @@ public class PurpurWorldConfig {
public float dolphinSpitSpeed = 1.0F;
public float dolphinSpitDamage = 2.0F;
public boolean dolphinDisableTreasureSearching = false;
@@ -1616,7 +1616,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean drownedRidable = false;
@@ -607,73 +703,135 @@ public class PurpurWorldConfig {
@@ -641,73 +737,135 @@ public class PurpurWorldConfig {
public boolean drownedJockeyOnlyBaby = true;
public double drownedJockeyChance = 0.05D;
public boolean drownedJockeyTryExistingChickens = true;
@@ -1752,7 +1752,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean giantRidable = false;
@@ -696,31 +854,68 @@ public class PurpurWorldConfig {
@@ -730,31 +888,68 @@ public class PurpurWorldConfig {
giantHaveHostileAI = getBoolean("mobs.giant.have-hostile-ai", giantHaveHostileAI);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.giant.max-health", giantMaxHealth);
@@ -1823,7 +1823,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean huskRidable = false;
@@ -728,12 +923,21 @@ public class PurpurWorldConfig {
@@ -762,12 +957,21 @@ public class PurpurWorldConfig {
public boolean huskJockeyOnlyBaby = true;
public double huskJockeyChance = 0.05D;
public boolean huskJockeyTryExistingChickens = true;
@@ -1845,7 +1845,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean illusionerRidable = false;
@@ -748,85 +952,188 @@ public class PurpurWorldConfig {
@@ -782,85 +986,188 @@ public class PurpurWorldConfig {
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.illusioner.max-health", illusionerMaxHealth);
@@ -2036,7 +2036,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean phantomRidable = false;
@@ -853,6 +1160,7 @@ public class PurpurWorldConfig {
@@ -887,6 +1194,7 @@ public class PurpurWorldConfig {
public boolean phantomIgnorePlayersWithTorch = false;
public boolean phantomBurnInDaylight = true;
public boolean phantomAllowGriefing = false;
@@ -2044,7 +2044,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void phantomSettings() {
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
@@ -878,38 +1186,72 @@ public class PurpurWorldConfig {
@@ -912,38 +1220,72 @@ public class PurpurWorldConfig {
phantomBurnInDaylight = getBoolean("mobs.phantom.burn-in-daylight", phantomBurnInDaylight);
phantomIgnorePlayersWithTorch = getBoolean("mobs.phantom.ignore-players-with-torch", phantomIgnorePlayersWithTorch);
phantomAllowGriefing = getBoolean("mobs.phantom.allow-griefing", phantomAllowGriefing);
@@ -2117,7 +2117,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean polarBearRidable = false;
@@ -917,6 +1259,7 @@ public class PurpurWorldConfig {
@@ -951,6 +1293,7 @@ public class PurpurWorldConfig {
public String polarBearBreedableItemString = "";
public Item polarBearBreedableItem = null;
public int polarBearBreedingTicks = 6000;
@@ -2125,7 +2125,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void polarBearSettings() {
polarBearRidable = getBoolean("mobs.polar_bear.ridable", polarBearRidable);
polarBearRidableInWater = getBoolean("mobs.polar_bear.ridable-in-water", polarBearRidableInWater);
@@ -924,11 +1267,24 @@ public class PurpurWorldConfig {
@@ -958,11 +1301,24 @@ public class PurpurWorldConfig {
Item item = IRegistry.ITEM.get(new MinecraftKey(polarBearBreedableItemString));
if (item != Items.AIR) polarBearBreedableItem = item;
polarBearBreedingTicks = getInt("mobs.polar_bear.breeding-delay-ticks", polarBearBreedingTicks);
@@ -2150,7 +2150,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean rabbitRidable = false;
@@ -936,68 +1292,144 @@ public class PurpurWorldConfig {
@@ -970,68 +1326,144 @@ public class PurpurWorldConfig {
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -2295,7 +2295,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean snowGolemRidable = false;
@@ -1009,6 +1441,7 @@ public class PurpurWorldConfig {
@@ -1043,6 +1475,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -2303,7 +2303,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1019,63 +1452,118 @@ public class PurpurWorldConfig {
@@ -1053,63 +1486,118 @@ public class PurpurWorldConfig {
snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax);
snowGolemSnowBallModifier = (float) getDouble("mobs.snow_golem.snow-ball-modifier", snowGolemSnowBallModifier);
snowGolemAttackDistance = getDouble("mobs.snow_golem.attack-distance", snowGolemAttackDistance);
@@ -2422,7 +2422,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean villagerRidable = false;
@@ -1093,6 +1581,7 @@ public class PurpurWorldConfig {
@@ -1127,6 +1615,7 @@ public class PurpurWorldConfig {
public int villagerLobotomizeCheck = 60;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -2430,7 +2430,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1114,33 +1603,60 @@ public class PurpurWorldConfig {
@@ -1148,33 +1637,60 @@ public class PurpurWorldConfig {
villagerLobotomizeCheck = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheck);
villagerClericsFarmWarts = getBoolean("mobs.villager.clerics-farm-warts", villagerClericsFarmWarts);
villagerClericFarmersThrowWarts = getBoolean("mobs.villager.cleric-wart-farmers-throw-warts-at-villagers", villagerClericFarmersThrowWarts);
@@ -2491,7 +2491,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean witherRidable = false;
@@ -1157,19 +1673,30 @@ public class PurpurWorldConfig {
@@ -1191,19 +1707,30 @@ public class PurpurWorldConfig {
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth);
@@ -2524,7 +2524,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean wolfRidable = false;
@@ -1178,6 +1705,7 @@ public class PurpurWorldConfig {
@@ -1212,6 +1739,7 @@ public class PurpurWorldConfig {
public boolean wolfMilkCuresRabies = true;
public double wolfNaturalRabid = 0.0D;
public int wolfBreedingTicks = 6000;
@@ -2532,7 +2532,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void wolfSettings() {
wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable);
wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater);
@@ -1189,13 +1717,26 @@ public class PurpurWorldConfig {
@@ -1223,13 +1751,26 @@ public class PurpurWorldConfig {
wolfMilkCuresRabies = getBoolean("mobs.wolf.milk-cures-rabid-wolves", wolfMilkCuresRabies);
wolfNaturalRabid = getDouble("mobs.wolf.spawn-rabid-chance", wolfNaturalRabid);
wolfBreedingTicks = getInt("mobs.wolf.breeding-delay-ticks", wolfBreedingTicks);
@@ -2559,7 +2559,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean zombieRidable = false;
@@ -1205,6 +1746,8 @@ public class PurpurWorldConfig {
@@ -1239,6 +1780,8 @@ public class PurpurWorldConfig {
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
public EnumDifficulty zombieBreakDoorMinDifficulty = EnumDifficulty.HARD;
@@ -2568,7 +2568,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -1217,15 +1760,40 @@ public class PurpurWorldConfig {
@@ -1251,15 +1794,40 @@ public class PurpurWorldConfig {
} catch (IllegalArgumentException ignore) {
zombieBreakDoorMinDifficulty = EnumDifficulty.HARD;
}
@@ -2609,7 +2609,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean zombifiedPiglinRidable = false;
@@ -1234,6 +1802,8 @@ public class PurpurWorldConfig {
@@ -1268,6 +1836,8 @@ public class PurpurWorldConfig {
public double zombifiedPiglinJockeyChance = 0.05D;
public boolean zombifiedPiglinJockeyTryExistingChickens = true;
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = true;
@@ -2618,7 +2618,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
private void zombifiedPiglinSettings() {
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
@@ -1241,6 +1811,13 @@ public class PurpurWorldConfig {
@@ -1275,6 +1845,13 @@ public class PurpurWorldConfig {
zombifiedPiglinJockeyChance = getDouble("mobs.zombified_piglin.jockey.chance", zombifiedPiglinJockeyChance);
zombifiedPiglinJockeyTryExistingChickens = getBoolean("mobs.zombified_piglin.jockey.try-existing-chickens", zombifiedPiglinJockeyTryExistingChickens);
zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry);
@@ -2632,7 +2632,7 @@ index 6f1ea7f760bd3a4ab6ba0787776b4017f9e6d52e..c423bc6a535a61dc7deed0b2c5f94eb1
}
public boolean zombieVillagerRidable = false;
@@ -1248,11 +1825,20 @@ public class PurpurWorldConfig {
@@ -1282,11 +1859,20 @@ public class PurpurWorldConfig {
public boolean zombieVillagerJockeyOnlyBaby = true;
public double zombieVillagerJockeyChance = 0.05D;
public boolean zombieVillagerJockeyTryExistingChickens = true;