Implement limited water

This commit is contained in:
Encode42
2021-09-29 14:50:07 -04:00
parent 92a00b8bf3
commit 5a724c0894
68 changed files with 316 additions and 286 deletions

View File

@@ -393,7 +393,7 @@ index e98fc3c235f9160f1928a8afb0d7991a6d3430cb..db35f756b7adb6b113659ae13b08ab89
return true;
// Purpur end
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb3bc5dad7 100644
index 43c4545b130e2a0178d3bfecc681dd82469eff99..3cd4988e9259697d95cddbe5d7c25b3ac0266b4d 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -381,9 +381,12 @@ public class PurpurWorldConfig {
@@ -434,7 +434,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
farmlandAlpha = getBoolean("blocks.farmland.use-alpha-farmland", farmlandAlpha);
}
@@ -501,6 +509,11 @@ public class PurpurWorldConfig {
@@ -508,6 +516,11 @@ public class PurpurWorldConfig {
kelpMaxGrowthAge = getInt("blocks.kelp.max-growth-age", kelpMaxGrowthAge);
}
@@ -446,7 +446,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
public boolean respawnAnchorExplode = true;
public double respawnAnchorExplosionPower = 5.0D;
public boolean respawnAnchorExplosionFire = true;
@@ -534,6 +547,11 @@ public class PurpurWorldConfig {
@@ -541,6 +554,11 @@ public class PurpurWorldConfig {
stonecutterDamage = (float) getDouble("blocks.stonecutter.damage", stonecutterDamage);
}
@@ -458,7 +458,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
public double twistingVinesGrowthModifier = 0.10D;
public int twistingVinesMaxGrowthAge = 25;
private void twistingVinesSettings() {
@@ -718,6 +736,7 @@ public class PurpurWorldConfig {
@@ -725,6 +743,7 @@ public class PurpurWorldConfig {
public double creeperMaxHealth = 20.0D;
public double creeperChargedChance = 0.0D;
public boolean creeperAllowGriefing = true;
@@ -466,7 +466,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -729,6 +748,7 @@ public class PurpurWorldConfig {
@@ -736,6 +755,7 @@ public class PurpurWorldConfig {
creeperMaxHealth = getDouble("mobs.creeper.attributes.max_health", creeperMaxHealth);
creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing);
@@ -474,7 +474,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean dolphinRidable = false;
@@ -816,6 +836,7 @@ public class PurpurWorldConfig {
@@ -823,6 +843,7 @@ public class PurpurWorldConfig {
public double enderDragonMaxY = 256D;
public double enderDragonMaxHealth = 200.0D;
public boolean enderDragonAlwaysDropsFullExp = false;
@@ -482,7 +482,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void enderDragonSettings() {
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
@@ -831,6 +852,7 @@ public class PurpurWorldConfig {
@@ -838,6 +859,7 @@ public class PurpurWorldConfig {
}
enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth);
enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp);
@@ -490,7 +490,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean endermanRidable = false;
@@ -838,6 +860,7 @@ public class PurpurWorldConfig {
@@ -845,6 +867,7 @@ public class PurpurWorldConfig {
public double endermanMaxHealth = 40.0D;
public boolean endermanAllowGriefing = true;
public boolean endermanDespawnEvenWithBlock = false;
@@ -498,7 +498,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void endermanSettings() {
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
@@ -849,6 +872,7 @@ public class PurpurWorldConfig {
@@ -856,6 +879,7 @@ public class PurpurWorldConfig {
endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth);
endermanAllowGriefing = getBoolean("mobs.enderman.allow-griefing", endermanAllowGriefing);
endermanDespawnEvenWithBlock = getBoolean("mobs.enderman.can-despawn-with-held-block", endermanDespawnEvenWithBlock);
@@ -506,7 +506,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean endermiteRidable = false;
@@ -868,6 +892,7 @@ public class PurpurWorldConfig {
@@ -875,6 +899,7 @@ public class PurpurWorldConfig {
public boolean evokerRidable = false;
public boolean evokerRidableInWater = false;
public double evokerMaxHealth = 24.0D;
@@ -514,7 +514,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void evokerSettings() {
evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
@@ -877,6 +902,7 @@ public class PurpurWorldConfig {
@@ -884,6 +909,7 @@ public class PurpurWorldConfig {
set("mobs.evoker.attributes.max_health", oldValue);
}
evokerMaxHealth = getDouble("mobs.evoker.attributes.max_health", evokerMaxHealth);
@@ -522,7 +522,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean foxRidable = false;
@@ -884,6 +910,7 @@ public class PurpurWorldConfig {
@@ -891,6 +917,7 @@ public class PurpurWorldConfig {
public double foxMaxHealth = 10.0D;
public boolean foxTypeChangesWithTulips = false;
public int foxBreedingTicks = 6000;
@@ -530,7 +530,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void foxSettings() {
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
@@ -895,6 +922,7 @@ public class PurpurWorldConfig {
@@ -902,6 +929,7 @@ 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);
@@ -538,7 +538,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean ghastRidable = false;
@@ -1290,6 +1318,7 @@ public class PurpurWorldConfig {
@@ -1297,6 +1325,7 @@ public class PurpurWorldConfig {
public boolean piglinRidable = false;
public boolean piglinRidableInWater = false;
public double piglinMaxHealth = 16.0D;
@@ -546,7 +546,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -1299,6 +1328,7 @@ public class PurpurWorldConfig {
@@ -1306,6 +1335,7 @@ public class PurpurWorldConfig {
set("mobs.piglin.attributes.max_health", oldValue);
}
piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth);
@@ -554,7 +554,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean piglinBruteRidable = false;
@@ -1318,6 +1348,7 @@ public class PurpurWorldConfig {
@@ -1325,6 +1355,7 @@ public class PurpurWorldConfig {
public boolean pillagerRidable = false;
public boolean pillagerRidableInWater = false;
public double pillagerMaxHealth = 24.0D;
@@ -562,7 +562,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void pillagerSettings() {
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
@@ -1327,6 +1358,7 @@ public class PurpurWorldConfig {
@@ -1334,6 +1365,7 @@ public class PurpurWorldConfig {
set("mobs.pillager.attributes.max_health", oldValue);
}
pillagerMaxHealth = getDouble("mobs.pillager.attributes.max_health", pillagerMaxHealth);
@@ -570,7 +570,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean polarBearRidable = false;
@@ -1368,6 +1400,7 @@ public class PurpurWorldConfig {
@@ -1375,6 +1407,7 @@ public class PurpurWorldConfig {
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -578,7 +578,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void rabbitSettings() {
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
@@ -1380,11 +1413,13 @@ public class PurpurWorldConfig {
@@ -1387,11 +1420,13 @@ public class PurpurWorldConfig {
rabbitNaturalToast = getDouble("mobs.rabbit.spawn-toast-chance", rabbitNaturalToast);
rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller);
rabbitBreedingTicks = getInt("mobs.rabbit.breeding-delay-ticks", rabbitBreedingTicks);
@@ -592,7 +592,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void ravagerSettings() {
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
@@ -1394,6 +1429,7 @@ public class PurpurWorldConfig {
@@ -1401,6 +1436,7 @@ public class PurpurWorldConfig {
set("mobs.ravager.attributes.max_health", oldValue);
}
ravagerMaxHealth = getDouble("mobs.ravager.attributes.max_health", ravagerMaxHealth);
@@ -600,7 +600,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean salmonRidable = false;
@@ -1412,6 +1448,7 @@ public class PurpurWorldConfig {
@@ -1419,6 +1455,7 @@ public class PurpurWorldConfig {
public boolean sheepRidableInWater = false;
public double sheepMaxHealth = 8.0D;
public int sheepBreedingTicks = 6000;
@@ -608,7 +608,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void sheepSettings() {
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
@@ -1422,6 +1459,7 @@ public class PurpurWorldConfig {
@@ -1429,6 +1466,7 @@ public class PurpurWorldConfig {
}
sheepMaxHealth = getDouble("mobs.sheep.attributes.max_health", sheepMaxHealth);
sheepBreedingTicks = getInt("mobs.sheep.breeding-delay-ticks", sheepBreedingTicks);
@@ -616,7 +616,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean shulkerRidable = false;
@@ -1441,6 +1479,7 @@ public class PurpurWorldConfig {
@@ -1448,6 +1486,7 @@ public class PurpurWorldConfig {
public boolean silverfishRidable = false;
public boolean silverfishRidableInWater = false;
public double silverfishMaxHealth = 8.0D;
@@ -624,7 +624,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void silverfishSettings() {
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
@@ -1450,6 +1489,7 @@ public class PurpurWorldConfig {
@@ -1457,6 +1496,7 @@ public class PurpurWorldConfig {
set("mobs.silverfish.attributes.max_health", oldValue);
}
silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max_health", silverfishMaxHealth);
@@ -632,7 +632,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean skeletonRidable = false;
@@ -1517,6 +1557,7 @@ public class PurpurWorldConfig {
@@ -1524,6 +1564,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -640,7 +640,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1533,6 +1574,7 @@ public class PurpurWorldConfig {
@@ -1540,6 +1581,7 @@ 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);
@@ -648,7 +648,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean squidRidable = false;
@@ -1692,6 +1734,7 @@ public class PurpurWorldConfig {
@@ -1699,6 +1741,7 @@ public class PurpurWorldConfig {
public int villagerLobotomizeCheck = 60;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -656,7 +656,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1718,6 +1761,7 @@ public class PurpurWorldConfig {
@@ -1725,6 +1768,7 @@ 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);
@@ -664,7 +664,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean vindicatorRidable = false;
@@ -1774,6 +1818,7 @@ public class PurpurWorldConfig {
@@ -1781,6 +1825,7 @@ public class PurpurWorldConfig {
public double witherMaxHealth = 300.0D;
public float witherHealthRegenAmount = 1.0f;
public int witherHealthRegenDelay = 20;
@@ -672,7 +672,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1790,6 +1835,7 @@ public class PurpurWorldConfig {
@@ -1797,6 +1842,7 @@ public class PurpurWorldConfig {
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
@@ -680,7 +680,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
}
public boolean witherSkeletonRidable = false;
@@ -1855,6 +1901,7 @@ public class PurpurWorldConfig {
@@ -1862,6 +1908,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
public Difficulty zombieBreakDoorMinDifficulty = Difficulty.HARD;
@@ -688,7 +688,7 @@ index b6800b176e59bb9d5e108bcc4f3d8e00423c393d..282a98b682558818bc1b694b82592feb
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -1874,6 +1921,7 @@ public class PurpurWorldConfig {
@@ -1881,6 +1928,7 @@ public class PurpurWorldConfig {
} catch (IllegalArgumentException ignore) {
zombieBreakDoorMinDifficulty = Difficulty.HARD;
}