Add item immunities option for cactus

This commit is contained in:
BillyGalbreath
2021-01-15 10:18:43 -06:00
parent 7356e48485
commit adcd1d2847
65 changed files with 239 additions and 215 deletions

View File

@@ -1314,10 +1314,10 @@ index 0c47477b416980d2e932321730525bf5a8feda4f..dc850677c29c16805f28af00b2a63363
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc00d585270 100644
index d0f8d2fb3b6bf65ae06a020b088d9e4ec348a673..112b8e595ac0562c490b82083452ef4ebfcb123e 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -466,30 +466,58 @@ public class PurpurWorldConfig {
@@ -472,30 +472,58 @@ public class PurpurWorldConfig {
public boolean batRidable = false;
public boolean batRidableInWater = false;
public double batMaxY = 256D;
@@ -1376,7 +1376,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean catRidable = false;
@@ -498,6 +526,7 @@ public class PurpurWorldConfig {
@@ -504,6 +532,7 @@ public class PurpurWorldConfig {
public int catSpawnSwampHutScanRange = 16;
public int catSpawnVillageScanRange = 48;
public int catBreedingTicks = 6000;
@@ -1384,7 +1384,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void catSettings() {
catRidable = getBoolean("mobs.cat.ridable", catRidable);
catRidableInWater = getBoolean("mobs.cat.ridable-in-water", catRidableInWater);
@@ -505,51 +534,92 @@ public class PurpurWorldConfig {
@@ -511,51 +540,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);
@@ -1477,7 +1477,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean dolphinRidable = false;
@@ -557,19 +627,45 @@ public class PurpurWorldConfig {
@@ -563,19 +633,45 @@ public class PurpurWorldConfig {
public float dolphinSpitSpeed = 1.0F;
public float dolphinSpitDamage = 2.0F;
public boolean dolphinDisableTreasureSearching = false;
@@ -1523,7 +1523,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean drownedRidable = false;
@@ -577,17 +673,33 @@ public class PurpurWorldConfig {
@@ -583,17 +679,33 @@ public class PurpurWorldConfig {
public boolean drownedJockeyOnlyBaby = true;
public double drownedJockeyChance = 0.05D;
public boolean drownedJockeyTryExistingChickens = true;
@@ -1557,7 +1557,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean enderDragonRidable = false;
@@ -595,57 +707,103 @@ public class PurpurWorldConfig {
@@ -601,57 +713,103 @@ public class PurpurWorldConfig {
public double enderDragonMaxY = 256D;
public boolean enderDragonAlwaysDropsEggBlock = false;
public boolean enderDragonAlwaysDropsFullExp = false;
@@ -1661,7 +1661,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean giantRidable = false;
@@ -668,31 +826,68 @@ public class PurpurWorldConfig {
@@ -674,31 +832,68 @@ public class PurpurWorldConfig {
giantHaveHostileAI = getBoolean("mobs.giant.have-hostile-ai", giantHaveHostileAI);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.giant.max-health", giantMaxHealth);
@@ -1732,7 +1732,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean huskRidable = false;
@@ -700,12 +895,21 @@ public class PurpurWorldConfig {
@@ -706,12 +901,21 @@ public class PurpurWorldConfig {
public boolean huskJockeyOnlyBaby = true;
public double huskJockeyChance = 0.05D;
public boolean huskJockeyTryExistingChickens = true;
@@ -1754,7 +1754,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean illusionerRidable = false;
@@ -720,85 +924,188 @@ public class PurpurWorldConfig {
@@ -726,85 +930,188 @@ public class PurpurWorldConfig {
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.illusioner.max-health", illusionerMaxHealth);
@@ -1945,7 +1945,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean phantomRidable = false;
@@ -824,6 +1131,7 @@ public class PurpurWorldConfig {
@@ -830,6 +1137,7 @@ public class PurpurWorldConfig {
public int phantomBurnInLight = 0;
public boolean phantomIgnorePlayersWithTorch = false;
public boolean phantomBurnInDaylight = true;
@@ -1953,7 +1953,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void phantomSettings() {
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
@@ -848,38 +1156,72 @@ public class PurpurWorldConfig {
@@ -854,38 +1162,72 @@ public class PurpurWorldConfig {
phantomBurnInLight = getInt("mobs.phantom.burn-in-light", phantomBurnInLight);
phantomBurnInDaylight = getBoolean("mobs.phantom.burn-in-daylight", phantomBurnInDaylight);
phantomIgnorePlayersWithTorch = getBoolean("mobs.phantom.ignore-players-with-torch", phantomIgnorePlayersWithTorch);
@@ -2026,7 +2026,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean polarBearRidable = false;
@@ -887,6 +1229,7 @@ public class PurpurWorldConfig {
@@ -893,6 +1235,7 @@ public class PurpurWorldConfig {
public String polarBearBreedableItemString = "";
public Item polarBearBreedableItem = null;
public int polarBearBreedingTicks = 6000;
@@ -2034,7 +2034,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void polarBearSettings() {
polarBearRidable = getBoolean("mobs.polar_bear.ridable", polarBearRidable);
polarBearRidableInWater = getBoolean("mobs.polar_bear.ridable-in-water", polarBearRidableInWater);
@@ -894,11 +1237,24 @@ public class PurpurWorldConfig {
@@ -900,11 +1243,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);
@@ -2059,7 +2059,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean rabbitRidable = false;
@@ -906,68 +1262,142 @@ public class PurpurWorldConfig {
@@ -912,68 +1268,142 @@ public class PurpurWorldConfig {
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -2202,7 +2202,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean snowGolemRidable = false;
@@ -979,6 +1409,7 @@ public class PurpurWorldConfig {
@@ -985,6 +1415,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -2210,7 +2210,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -989,63 +1420,118 @@ public class PurpurWorldConfig {
@@ -995,63 +1426,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);
@@ -2329,7 +2329,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean villagerRidable = false;
@@ -1062,6 +1548,7 @@ public class PurpurWorldConfig {
@@ -1068,6 +1554,7 @@ public class PurpurWorldConfig {
public int villagerLobotomizeCheck = 60;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -2337,7 +2337,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1082,33 +1569,60 @@ public class PurpurWorldConfig {
@@ -1088,33 +1575,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);
@@ -2398,7 +2398,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean witherRidable = false;
@@ -1125,19 +1639,30 @@ public class PurpurWorldConfig {
@@ -1131,19 +1645,30 @@ public class PurpurWorldConfig {
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth);
@@ -2431,7 +2431,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean wolfRidable = false;
@@ -1146,6 +1671,7 @@ public class PurpurWorldConfig {
@@ -1152,6 +1677,7 @@ public class PurpurWorldConfig {
public boolean wolfMilkCuresRabies = true;
public double wolfNaturalRabid = 0.0D;
public int wolfBreedingTicks = 6000;
@@ -2439,7 +2439,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void wolfSettings() {
wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable);
wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater);
@@ -1157,13 +1683,26 @@ public class PurpurWorldConfig {
@@ -1163,13 +1689,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);
@@ -2466,7 +2466,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean zombieRidable = false;
@@ -1173,6 +1712,8 @@ public class PurpurWorldConfig {
@@ -1179,6 +1718,8 @@ public class PurpurWorldConfig {
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
public EnumDifficulty zombieBreakDoorMinDifficulty = EnumDifficulty.HARD;
@@ -2475,7 +2475,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -1185,15 +1726,40 @@ public class PurpurWorldConfig {
@@ -1191,15 +1732,40 @@ public class PurpurWorldConfig {
} catch (IllegalArgumentException ignore) {
zombieBreakDoorMinDifficulty = EnumDifficulty.HARD;
}
@@ -2516,7 +2516,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean zombifiedPiglinRidable = false;
@@ -1202,6 +1768,8 @@ public class PurpurWorldConfig {
@@ -1208,6 +1774,8 @@ public class PurpurWorldConfig {
public double zombifiedPiglinJockeyChance = 0.05D;
public boolean zombifiedPiglinJockeyTryExistingChickens = true;
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = true;
@@ -2525,7 +2525,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
private void zombifiedPiglinSettings() {
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
@@ -1209,6 +1777,13 @@ public class PurpurWorldConfig {
@@ -1215,6 +1783,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);
@@ -2539,7 +2539,7 @@ index d3235065b847993f38e0e4e781269d28313e23ba..279b9677d724f1dbbdb7efe665c4ebc0
}
public boolean zombieVillagerRidable = false;
@@ -1216,11 +1791,20 @@ public class PurpurWorldConfig {
@@ -1222,11 +1797,20 @@ public class PurpurWorldConfig {
public boolean zombieVillagerJockeyOnlyBaby = true;
public double zombieVillagerJockeyChance = 0.05D;
public boolean zombieVillagerJockeyTryExistingChickens = true;