Add Ridable and Attribute options for Creaking mob (#1613)

This commit is contained in:
Nebojsa Majic
2024-11-26 12:59:33 +01:00
committed by GitHub
parent 0601f870d4
commit 06dde9dea0
79 changed files with 697 additions and 604 deletions

View File

@@ -382,7 +382,7 @@ index bae4931fff0db56aa125248e17b29f7c2557221f..a265c5bf1a4d6f3c84cad20f9b3c285d
}
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee17184288 100644
index 19c6572a82de81b5a3aacad4bd77878d6c21ddc8..4f31d65962618a29b0a52ec7c51fba2267d63a05 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -121,6 +121,9 @@ public class PurpurWorldConfig {
@@ -442,7 +442,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public int waterInfiniteRequiredSources = 2;
@@ -745,6 +760,7 @@ public class PurpurWorldConfig {
@@ -758,6 +773,7 @@ public class PurpurWorldConfig {
public double creeperScale = 1.0D;
public double creeperChargedChance = 0.0D;
public boolean creeperAllowGriefing = true;
@@ -450,7 +450,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -758,6 +774,7 @@ public class PurpurWorldConfig {
@@ -771,6 +787,7 @@ public class PurpurWorldConfig {
creeperScale = Mth.clamp(getDouble("mobs.creeper.attributes.scale", creeperScale), 0.0625D, 16.0D);
creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing);
@@ -458,7 +458,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean dolphinRidable = false;
@@ -858,6 +875,7 @@ public class PurpurWorldConfig {
@@ -871,6 +888,7 @@ public class PurpurWorldConfig {
public double enderDragonMaxY = 320D;
public double enderDragonMaxHealth = 200.0D;
public boolean enderDragonAlwaysDropsFullExp = false;
@@ -466,7 +466,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void enderDragonSettings() {
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
@@ -874,6 +892,7 @@ public class PurpurWorldConfig {
@@ -887,6 +905,7 @@ public class PurpurWorldConfig {
}
enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth);
enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp);
@@ -474,7 +474,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean endermanRidable = false;
@@ -883,6 +902,7 @@ public class PurpurWorldConfig {
@@ -896,6 +915,7 @@ public class PurpurWorldConfig {
public double endermanScale = 1.0D;
public boolean endermanAllowGriefing = true;
public boolean endermanDespawnEvenWithBlock = false;
@@ -482,7 +482,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void endermanSettings() {
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
@@ -896,6 +916,7 @@ public class PurpurWorldConfig {
@@ -909,6 +929,7 @@ public class PurpurWorldConfig {
endermanScale = Mth.clamp(getDouble("mobs.enderman.attributes.scale", endermanScale), 0.0625D, 16.0D);
endermanAllowGriefing = getBoolean("mobs.enderman.allow-griefing", endermanAllowGriefing);
endermanDespawnEvenWithBlock = getBoolean("mobs.enderman.can-despawn-with-held-block", endermanDespawnEvenWithBlock);
@@ -490,7 +490,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean endermiteRidable = false;
@@ -921,6 +942,7 @@ public class PurpurWorldConfig {
@@ -934,6 +955,7 @@ public class PurpurWorldConfig {
public boolean evokerControllable = true;
public double evokerMaxHealth = 24.0D;
public double evokerScale = 1.0D;
@@ -498,7 +498,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void evokerSettings() {
evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
@@ -932,6 +954,7 @@ public class PurpurWorldConfig {
@@ -945,6 +967,7 @@ public class PurpurWorldConfig {
}
evokerMaxHealth = getDouble("mobs.evoker.attributes.max_health", evokerMaxHealth);
evokerScale = Mth.clamp(getDouble("mobs.evoker.attributes.scale", evokerScale), 0.0625D, 16.0D);
@@ -506,7 +506,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean foxRidable = false;
@@ -941,6 +964,7 @@ public class PurpurWorldConfig {
@@ -954,6 +977,7 @@ public class PurpurWorldConfig {
public double foxScale = 1.0D;
public boolean foxTypeChangesWithTulips = false;
public int foxBreedingTicks = 6000;
@@ -514,7 +514,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void foxSettings() {
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
@@ -954,6 +978,7 @@ public class PurpurWorldConfig {
@@ -967,6 +991,7 @@ public class PurpurWorldConfig {
foxScale = Mth.clamp(getDouble("mobs.fox.attributes.scale", foxScale), 0.0625D, 16.0D);
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
foxBreedingTicks = getInt("mobs.fox.breeding-delay-ticks", foxBreedingTicks);
@@ -522,7 +522,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean frogRidable = false;
@@ -1430,6 +1455,7 @@ public class PurpurWorldConfig {
@@ -1443,6 +1468,7 @@ public class PurpurWorldConfig {
public boolean piglinControllable = true;
public double piglinMaxHealth = 16.0D;
public double piglinScale = 1.0D;
@@ -530,7 +530,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -1441,6 +1467,7 @@ public class PurpurWorldConfig {
@@ -1454,6 +1480,7 @@ public class PurpurWorldConfig {
}
piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth);
piglinScale = Mth.clamp(getDouble("mobs.piglin.attributes.scale", piglinScale), 0.0625D, 16.0D);
@@ -538,7 +538,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean piglinBruteRidable = false;
@@ -1466,6 +1493,7 @@ public class PurpurWorldConfig {
@@ -1479,6 +1506,7 @@ public class PurpurWorldConfig {
public boolean pillagerControllable = true;
public double pillagerMaxHealth = 24.0D;
public double pillagerScale = 1.0D;
@@ -546,7 +546,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void pillagerSettings() {
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
@@ -1477,6 +1505,7 @@ public class PurpurWorldConfig {
@@ -1490,6 +1518,7 @@ public class PurpurWorldConfig {
}
pillagerMaxHealth = getDouble("mobs.pillager.attributes.max_health", pillagerMaxHealth);
pillagerScale = Mth.clamp(getDouble("mobs.pillager.attributes.scale", pillagerScale), 0.0625D, 16.0D);
@@ -554,7 +554,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean polarBearRidable = false;
@@ -1528,6 +1557,7 @@ public class PurpurWorldConfig {
@@ -1541,6 +1570,7 @@ public class PurpurWorldConfig {
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -562,7 +562,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void rabbitSettings() {
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
@@ -1542,6 +1572,7 @@ public class PurpurWorldConfig {
@@ -1555,6 +1585,7 @@ 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);
@@ -570,7 +570,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean ravagerRidable = false;
@@ -1549,6 +1580,7 @@ public class PurpurWorldConfig {
@@ -1562,6 +1593,7 @@ public class PurpurWorldConfig {
public boolean ravagerControllable = true;
public double ravagerMaxHealth = 100.0D;
public double ravagerScale = 1.0D;
@@ -578,7 +578,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void ravagerSettings() {
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
@@ -1560,6 +1592,7 @@ public class PurpurWorldConfig {
@@ -1573,6 +1605,7 @@ public class PurpurWorldConfig {
}
ravagerMaxHealth = getDouble("mobs.ravager.attributes.max_health", ravagerMaxHealth);
ravagerScale = Mth.clamp(getDouble("mobs.ravager.attributes.scale", ravagerScale), 0.0625D, 16.0D);
@@ -586,7 +586,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean salmonRidable = false;
@@ -1584,6 +1617,7 @@ public class PurpurWorldConfig {
@@ -1597,6 +1630,7 @@ public class PurpurWorldConfig {
public double sheepMaxHealth = 8.0D;
public double sheepScale = 1.0D;
public int sheepBreedingTicks = 6000;
@@ -594,7 +594,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void sheepSettings() {
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
@@ -1596,6 +1630,7 @@ public class PurpurWorldConfig {
@@ -1609,6 +1643,7 @@ public class PurpurWorldConfig {
sheepMaxHealth = getDouble("mobs.sheep.attributes.max_health", sheepMaxHealth);
sheepScale = Mth.clamp(getDouble("mobs.sheep.attributes.scale", sheepScale), 0.0625D, 16.0D);
sheepBreedingTicks = getInt("mobs.sheep.breeding-delay-ticks", sheepBreedingTicks);
@@ -602,7 +602,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean shulkerRidable = false;
@@ -1623,6 +1658,7 @@ public class PurpurWorldConfig {
@@ -1636,6 +1671,7 @@ public class PurpurWorldConfig {
public double silverfishScale = 1.0D;
public double silverfishMovementSpeed = 0.25D;
public double silverfishAttackDamage = 1.0D;
@@ -610,7 +610,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void silverfishSettings() {
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
@@ -1636,6 +1672,7 @@ public class PurpurWorldConfig {
@@ -1649,6 +1685,7 @@ public class PurpurWorldConfig {
silverfishScale = Mth.clamp(getDouble("mobs.silverfish.attributes.scale", silverfishScale), 0.0625D, 16.0D);
silverfishMovementSpeed = getDouble("mobs.silverfish.attributes.movement_speed", silverfishMovementSpeed);
silverfishAttackDamage = getDouble("mobs.silverfish.attributes.attack_damage", silverfishAttackDamage);
@@ -618,7 +618,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean skeletonRidable = false;
@@ -1716,6 +1753,7 @@ public class PurpurWorldConfig {
@@ -1729,6 +1766,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -626,7 +626,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1733,6 +1771,7 @@ public class PurpurWorldConfig {
@@ -1746,6 +1784,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);
@@ -634,7 +634,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean snifferRidable = false;
@@ -1937,6 +1976,7 @@ public class PurpurWorldConfig {
@@ -1950,6 +1989,7 @@ public class PurpurWorldConfig {
public int villagerBreedingTicks = 6000;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -642,7 +642,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1955,6 +1995,7 @@ public class PurpurWorldConfig {
@@ -1968,6 +2008,7 @@ public class PurpurWorldConfig {
villagerBreedingTicks = getInt("mobs.villager.breeding-delay-ticks", villagerBreedingTicks);
villagerClericsFarmWarts = getBoolean("mobs.villager.clerics-farm-warts", villagerClericsFarmWarts);
villagerClericFarmersThrowWarts = getBoolean("mobs.villager.cleric-wart-farmers-throw-warts-at-villagers", villagerClericFarmersThrowWarts);
@@ -650,7 +650,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean vindicatorRidable = false;
@@ -2036,6 +2077,7 @@ public class PurpurWorldConfig {
@@ -2049,6 +2090,7 @@ public class PurpurWorldConfig {
public double witherScale = 1.0D;
public float witherHealthRegenAmount = 1.0f;
public int witherHealthRegenDelay = 20;
@@ -658,7 +658,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -2054,6 +2096,7 @@ public class PurpurWorldConfig {
@@ -2067,6 +2109,7 @@ public class PurpurWorldConfig {
witherScale = Mth.clamp(getDouble("mobs.wither.attributes.scale", witherScale), 0.0625D, 16.0D);
witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
@@ -666,7 +666,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
}
public boolean witherSkeletonRidable = false;
@@ -2132,6 +2175,7 @@ public class PurpurWorldConfig {
@@ -2145,6 +2188,7 @@ public class PurpurWorldConfig {
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
@@ -674,7 +674,7 @@ index 44db4f1f86758535300cb88941aa466990f55f92..fbbf7153606fc3ccad12ca4a164436ee
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -2148,6 +2192,7 @@ public class PurpurWorldConfig {
@@ -2161,6 +2205,7 @@ public class PurpurWorldConfig {
zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance);
zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens);
zombieAggressiveTowardsVillagerWhenLagging = getBoolean("mobs.zombie.aggressive-towards-villager-when-lagging", zombieAggressiveTowardsVillagerWhenLagging);