add ridable 1.19 mobs

This commit is contained in:
BillyGalbreath
2022-06-12 09:06:50 -05:00
parent 99b1dd738d
commit 0045a57c5d
83 changed files with 995 additions and 689 deletions

View File

@@ -144,10 +144,10 @@ index 9ce2527054f5163eae3d1216427378dcdf92a2fe..d655bd2ecce01a54695d135b12b2f930
// flag1 = this.level.removeBlock(blockposition, false) || flag1;
flag1 = true;
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 2a7eac0dc5dbf71cb1b98903e78532cb8d506cfc..3dfb7f3d11b69e08682d8b955adde3576c3ce6a1 100644
index c39e6ab8ffb850eb6ba783d237daad7e011a03bc..2207c5a71b8a3c7c0c68388ec744c5272d10ab36 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -390,7 +390,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -402,7 +402,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
i = this.getInvulnerableTicks() - 1;
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
if (i <= 0) {
@@ -156,7 +156,7 @@ index 2a7eac0dc5dbf71cb1b98903e78532cb8d506cfc..3dfb7f3d11b69e08682d8b955adde357
// CraftBukkit start
// this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, explosion_effect);
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
@@ -486,7 +486,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -498,7 +498,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
if (this.destroyBlocksTick > 0) {
--this.destroyBlocksTick;
@@ -393,7 +393,7 @@ index 1a12fee99a8b69fc6c01e1e217575c7c19e13155..4907e0acb7d01b7f57b75579e58ce743
return true;
// Purpur end
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a41241ac50 100644
index 881e9c611f7f5fc56af316cbf1ff73b680b6e4ce..8b97adcc2461641d89d3340084d15d0bf235ae28 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -109,8 +109,11 @@ public class PurpurWorldConfig {
@@ -457,7 +457,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean waterInfinite = true;
@@ -691,6 +706,7 @@ public class PurpurWorldConfig {
@@ -700,6 +715,7 @@ public class PurpurWorldConfig {
public double creeperMaxHealth = 20.0D;
public double creeperChargedChance = 0.0D;
public boolean creeperAllowGriefing = true;
@@ -465,7 +465,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -703,6 +719,7 @@ public class PurpurWorldConfig {
@@ -712,6 +728,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);
@@ -473,7 +473,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean dolphinRidable = false;
@@ -797,6 +814,7 @@ public class PurpurWorldConfig {
@@ -806,6 +823,7 @@ public class PurpurWorldConfig {
public double enderDragonMaxY = 320D;
public double enderDragonMaxHealth = 200.0D;
public boolean enderDragonAlwaysDropsFullExp = false;
@@ -481,7 +481,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void enderDragonSettings() {
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
@@ -813,6 +831,7 @@ public class PurpurWorldConfig {
@@ -822,6 +840,7 @@ public class PurpurWorldConfig {
}
enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth);
enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp);
@@ -489,7 +489,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean endermanRidable = false;
@@ -821,6 +840,7 @@ public class PurpurWorldConfig {
@@ -830,6 +849,7 @@ public class PurpurWorldConfig {
public double endermanMaxHealth = 40.0D;
public boolean endermanAllowGriefing = true;
public boolean endermanDespawnEvenWithBlock = false;
@@ -497,7 +497,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void endermanSettings() {
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
@@ -833,6 +853,7 @@ public class PurpurWorldConfig {
@@ -842,6 +862,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);
@@ -505,7 +505,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean endermiteRidable = false;
@@ -855,6 +876,7 @@ public class PurpurWorldConfig {
@@ -864,6 +885,7 @@ public class PurpurWorldConfig {
public boolean evokerRidableInWater = false;
public boolean evokerControllable = true;
public double evokerMaxHealth = 24.0D;
@@ -513,7 +513,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void evokerSettings() {
evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
@@ -865,6 +887,7 @@ public class PurpurWorldConfig {
@@ -874,6 +896,7 @@ public class PurpurWorldConfig {
set("mobs.evoker.attributes.max_health", oldValue);
}
evokerMaxHealth = getDouble("mobs.evoker.attributes.max_health", evokerMaxHealth);
@@ -521,7 +521,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean foxRidable = false;
@@ -873,6 +896,7 @@ public class PurpurWorldConfig {
@@ -882,6 +905,7 @@ public class PurpurWorldConfig {
public double foxMaxHealth = 10.0D;
public boolean foxTypeChangesWithTulips = false;
public int foxBreedingTicks = 6000;
@@ -529,15 +529,15 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void foxSettings() {
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
@@ -885,6 +909,7 @@ public class PurpurWorldConfig {
@@ -894,6 +918,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);
+ foxBypassMobGriefing = getBoolean("mobs.fox.bypass-mob-griefing", foxBypassMobGriefing);
}
public int frogBreedingTicks = 6000;
@@ -1336,6 +1361,7 @@ public class PurpurWorldConfig {
public boolean frogRidable = false;
@@ -1353,6 +1378,7 @@ public class PurpurWorldConfig {
public boolean piglinRidableInWater = false;
public boolean piglinControllable = true;
public double piglinMaxHealth = 16.0D;
@@ -545,7 +545,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -1346,6 +1372,7 @@ public class PurpurWorldConfig {
@@ -1363,6 +1389,7 @@ public class PurpurWorldConfig {
set("mobs.piglin.attributes.max_health", oldValue);
}
piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth);
@@ -553,7 +553,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean piglinBruteRidable = false;
@@ -1368,6 +1395,7 @@ public class PurpurWorldConfig {
@@ -1385,6 +1412,7 @@ public class PurpurWorldConfig {
public boolean pillagerRidableInWater = false;
public boolean pillagerControllable = true;
public double pillagerMaxHealth = 24.0D;
@@ -561,7 +561,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void pillagerSettings() {
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
@@ -1378,6 +1406,7 @@ public class PurpurWorldConfig {
@@ -1395,6 +1423,7 @@ public class PurpurWorldConfig {
set("mobs.pillager.attributes.max_health", oldValue);
}
pillagerMaxHealth = getDouble("mobs.pillager.attributes.max_health", pillagerMaxHealth);
@@ -569,7 +569,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean polarBearRidable = false;
@@ -1424,6 +1453,7 @@ public class PurpurWorldConfig {
@@ -1441,6 +1470,7 @@ public class PurpurWorldConfig {
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -577,7 +577,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void rabbitSettings() {
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
@@ -1437,12 +1467,14 @@ public class PurpurWorldConfig {
@@ -1454,12 +1484,14 @@ 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 c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void ravagerSettings() {
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
@@ -1453,6 +1485,7 @@ public class PurpurWorldConfig {
@@ -1470,6 +1502,7 @@ public class PurpurWorldConfig {
set("mobs.ravager.attributes.max_health", oldValue);
}
ravagerMaxHealth = getDouble("mobs.ravager.attributes.max_health", ravagerMaxHealth);
@@ -600,7 +600,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean salmonRidable = false;
@@ -1474,6 +1507,7 @@ public class PurpurWorldConfig {
@@ -1491,6 +1524,7 @@ public class PurpurWorldConfig {
public boolean sheepControllable = true;
public double sheepMaxHealth = 8.0D;
public int sheepBreedingTicks = 6000;
@@ -608,7 +608,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void sheepSettings() {
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
@@ -1485,6 +1519,7 @@ public class PurpurWorldConfig {
@@ -1502,6 +1536,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 c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean shulkerRidable = false;
@@ -1507,6 +1542,7 @@ public class PurpurWorldConfig {
@@ -1524,6 +1559,7 @@ public class PurpurWorldConfig {
public boolean silverfishRidableInWater = false;
public boolean silverfishControllable = true;
public double silverfishMaxHealth = 8.0D;
@@ -624,7 +624,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void silverfishSettings() {
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
@@ -1517,6 +1553,7 @@ public class PurpurWorldConfig {
@@ -1534,6 +1570,7 @@ public class PurpurWorldConfig {
set("mobs.silverfish.attributes.max_health", oldValue);
}
silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max_health", silverfishMaxHealth);
@@ -632,7 +632,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean skeletonRidable = false;
@@ -1593,6 +1630,7 @@ public class PurpurWorldConfig {
@@ -1610,6 +1647,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -640,7 +640,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1610,6 +1648,7 @@ public class PurpurWorldConfig {
@@ -1627,6 +1665,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 c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean squidRidable = false;
@@ -1776,6 +1815,7 @@ public class PurpurWorldConfig {
@@ -1802,6 +1841,7 @@ public class PurpurWorldConfig {
public int villagerBreedingTicks = 6000;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -656,7 +656,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1794,6 +1834,7 @@ public class PurpurWorldConfig {
@@ -1820,6 +1860,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);
@@ -664,7 +664,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean vindicatorRidable = false;
@@ -1857,6 +1898,7 @@ public class PurpurWorldConfig {
@@ -1892,6 +1933,7 @@ public class PurpurWorldConfig {
public double witherMaxHealth = 300.0D;
public float witherHealthRegenAmount = 1.0f;
public int witherHealthRegenDelay = 20;
@@ -672,7 +672,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1874,6 +1916,7 @@ public class PurpurWorldConfig {
@@ -1909,6 +1951,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 c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
}
public boolean witherSkeletonRidable = false;
@@ -1945,6 +1988,7 @@ public class PurpurWorldConfig {
@@ -1980,6 +2023,7 @@ public class PurpurWorldConfig {
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
@@ -688,7 +688,7 @@ index c93c78b1d4d6816794c5a8a97f1d4f04823c7fd8..23d4b864bffe8ccb313882c4a59c03a4
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -1960,6 +2004,7 @@ public class PurpurWorldConfig {
@@ -1995,6 +2039,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);