Add config for void damage dealt

This commit is contained in:
BillyGalbreath
2021-05-01 15:02:10 -05:00
parent 786382bc3e
commit a30e5ac971
100 changed files with 322 additions and 306 deletions

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
This adds the "bypass-mob-griefing" world config option to everything that is affected by the gamerule.
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index f0a485056f3ad94e7375fbdfd512026b969a0eed..e866531958c9d0171d39ba7f6963fe92eb2d42cc 100644
index 4099ff50644aa68cddf16203c84ca0bbfd1c20ed..56ea148ddff1674e46c258f2658d0f4b5313e63a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1571,7 +1571,7 @@ public abstract class EntityLiving extends Entity {
@@ -338,7 +338,7 @@ index 04504901b1933ed760b34b8abb994de8ec340a4e..e18be05c9a9230105ec54395d4391c86
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 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755bdb277292 100644
index 59a19ab449287226938852a06b88d20c2062a43c..bad517f152bf660d75e9c9ceaea31d0d8b13b279 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -286,6 +286,7 @@ public class PurpurWorldConfig {
@@ -349,7 +349,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
public boolean milkCuresBadOmen = true;
public boolean persistentTileEntityDisplayNames = false;
public boolean persistentDroppableEntityDisplayNames = false;
@@ -300,6 +301,7 @@ public class PurpurWorldConfig {
@@ -301,6 +302,7 @@ public class PurpurWorldConfig {
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
@@ -357,7 +357,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
persistentTileEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-tileentity-display-names-and-lore", persistentTileEntityDisplayNames);
persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames);
@@ -452,9 +454,11 @@ public class PurpurWorldConfig {
@@ -454,9 +456,11 @@ public class PurpurWorldConfig {
dispenserPlaceAnvils = getBoolean("blocks.dispenser.place-anvils", dispenserPlaceAnvils);
}
@@ -369,7 +369,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
farmlandAlpha = getBoolean("blocks.farmland.use-alpha-farmland", farmlandAlpha);
}
@@ -513,10 +517,12 @@ public class PurpurWorldConfig {
@@ -515,10 +519,12 @@ public class PurpurWorldConfig {
stonecutterDamage = (float) getDouble("blocks.stonecutter.damage", stonecutterDamage);
}
@@ -382,7 +382,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
turtleEggsBreakFromExpOrbs = getBoolean("blocks.turtle_egg.break-from-exp-orbs", turtleEggsBreakFromExpOrbs);
turtleEggsBreakFromItems = getBoolean("blocks.turtle_egg.break-from-items", turtleEggsBreakFromItems);
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
@@ -788,12 +794,14 @@ public class PurpurWorldConfig {
@@ -790,12 +796,14 @@ public class PurpurWorldConfig {
public boolean enderDragonRidableInWater = false;
public double enderDragonMaxY = 256D;
public boolean enderDragonAlwaysDropsFullExp = false;
@@ -397,7 +397,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.ender_dragon.max-health", enderDragonMaxHealth);
set("mobs.ender_dragon.max-health", null);
@@ -809,12 +817,14 @@ public class PurpurWorldConfig {
@@ -811,12 +819,14 @@ public class PurpurWorldConfig {
public boolean endermanRidable = false;
public boolean endermanRidableInWater = false;
public boolean endermanAllowGriefing = true;
@@ -412,7 +412,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
endermanDespawnEvenWithBlock = getBoolean("mobs.enderman.can-despawn-with-held-block", endermanDespawnEvenWithBlock);
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.enderman.attributes.max-health", endermanMaxHealth);
@@ -840,10 +850,12 @@ public class PurpurWorldConfig {
@@ -842,10 +852,12 @@ public class PurpurWorldConfig {
public boolean evokerRidable = false;
public boolean evokerRidableInWater = false;
@@ -425,7 +425,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.evoker.attributes.max-health", evokerMaxHealth);
set("mobs.evoker.attributes.max-health", null);
@@ -854,12 +866,14 @@ public class PurpurWorldConfig {
@@ -856,12 +868,14 @@ public class PurpurWorldConfig {
public boolean foxRidable = false;
public boolean foxRidableInWater = false;
@@ -440,7 +440,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
foxBreedingTicks = getInt("mobs.fox.breeding-delay-ticks", foxBreedingTicks);
if (PurpurConfig.version < 10) {
@@ -1296,10 +1310,12 @@ public class PurpurWorldConfig {
@@ -1298,10 +1312,12 @@ public class PurpurWorldConfig {
public boolean pillagerRidable = false;
public boolean pillagerRidableInWater = false;
@@ -453,7 +453,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.pillager.attributes.max-health", pillagerMaxHealth);
set("mobs.pillager.attributes.max-health", null);
@@ -1343,6 +1359,7 @@ public class PurpurWorldConfig {
@@ -1345,6 +1361,7 @@ public class PurpurWorldConfig {
public boolean rabbitRidable = false;
public boolean rabbitRidableInWater = false;
@@ -461,7 +461,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
public int rabbitBreedingTicks = 6000;
@@ -1350,6 +1367,7 @@ public class PurpurWorldConfig {
@@ -1352,6 +1369,7 @@ public class PurpurWorldConfig {
private void rabbitSettings() {
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
@@ -469,7 +469,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
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);
@@ -1363,10 +1381,12 @@ public class PurpurWorldConfig {
@@ -1365,10 +1383,12 @@ public class PurpurWorldConfig {
public boolean ravagerRidable = false;
public boolean ravagerRidableInWater = false;
@@ -482,7 +482,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.ravager.attributes.max-health", ravagerMaxHealth);
set("mobs.ravager.attributes.max-health", null);
@@ -1390,11 +1410,13 @@ public class PurpurWorldConfig {
@@ -1392,11 +1412,13 @@ public class PurpurWorldConfig {
public boolean sheepRidable = false;
public boolean sheepRidableInWater = false;
public int sheepBreedingTicks = 6000;
@@ -496,7 +496,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.sheep.attributes.max-health", sheepMaxHealth);
set("mobs.sheep.attributes.max-health", null);
@@ -1419,10 +1441,12 @@ public class PurpurWorldConfig {
@@ -1421,10 +1443,12 @@ public class PurpurWorldConfig {
public boolean silverfishRidable = false;
public boolean silverfishRidableInWater = false;
@@ -509,7 +509,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.silverfish.attributes.max-health", silverfishMaxHealth);
set("mobs.silverfish.attributes.max-health", null);
@@ -1489,6 +1513,7 @@ public class PurpurWorldConfig {
@@ -1491,6 +1515,7 @@ public class PurpurWorldConfig {
public boolean snowGolemRidable = false;
public boolean snowGolemRidableInWater = false;
public boolean snowGolemLeaveTrailWhenRidden = false;
@@ -517,7 +517,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
public boolean snowGolemDropsPumpkin = true;
public boolean snowGolemPutPumpkinBack = false;
public int snowGolemSnowBallMin = 20;
@@ -1500,6 +1525,7 @@ public class PurpurWorldConfig {
@@ -1502,6 +1527,7 @@ public class PurpurWorldConfig {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
snowGolemLeaveTrailWhenRidden = getBoolean("mobs.snow_golem.leave-trail-when-ridden", snowGolemLeaveTrailWhenRidden);
@@ -525,7 +525,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
snowGolemDropsPumpkin = getBoolean("mobs.snow_golem.drop-pumpkin-when-sheared", snowGolemDropsPumpkin);
snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
snowGolemSnowBallMin = getInt("mobs.snow_golem.min-shoot-interval-ticks", snowGolemSnowBallMin);
@@ -1718,6 +1744,7 @@ public class PurpurWorldConfig {
@@ -1720,6 +1746,7 @@ public class PurpurWorldConfig {
public boolean witherRidable = false;
public boolean witherRidableInWater = false;
public double witherMaxY = 256D;
@@ -533,7 +533,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
public float witherHealthRegenAmount = 1.0f;
public int witherHealthRegenDelay = 20;
public double witherMaxHealth = 300.0D;
@@ -1725,6 +1752,7 @@ public class PurpurWorldConfig {
@@ -1727,6 +1754,7 @@ public class PurpurWorldConfig {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
witherMaxY = getDouble("mobs.wither.ridable-max-y", witherMaxY);
@@ -541,7 +541,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
if (PurpurConfig.version < 8) {
@@ -1797,6 +1825,7 @@ public class PurpurWorldConfig {
@@ -1799,6 +1827,7 @@ public class PurpurWorldConfig {
public boolean zombieRidable = false;
public boolean zombieRidableInWater = false;
@@ -549,7 +549,7 @@ index 2d9d963773b1df9a5d7520a5c295d40ebf56761f..751558a0a3fcb0433d7b580e5618755b
public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
@@ -1807,6 +1836,7 @@ public class PurpurWorldConfig {
@@ -1809,6 +1838,7 @@ public class PurpurWorldConfig {
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);