Resolve #286 - Add config and API for item immunity to lightning

This commit is contained in:
BillyGalbreath
2021-05-03 13:32:36 -05:00
parent a86555bb5d
commit 83665826a9
98 changed files with 362 additions and 359 deletions

View File

@@ -5559,7 +5559,7 @@ index 3b20793e3eb4349f8a4ce724f8fc0d6366bb28c2..9789d0f9f73540a486befcdd4901014e
public static int dungeonSeed = -1;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717fbb1787b 100644
index f16f99517999ccbb0b5a678ffcb3befc93a3ae45..9fcc63a2f4a4c363ace85087665bf3a978d3d648 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -42,11 +42,6 @@ public class PurpurWorldConfig {
@@ -5574,7 +5574,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
private ConfigurationSection getConfigurationSection(String path) {
ConfigurationSection section = PurpurConfig.config.getConfigurationSection("world-settings." + worldName + "." + path);
return section != null ? section : PurpurConfig.config.getConfigurationSection("world-settings.default." + path);
@@ -375,61 +370,186 @@ public class PurpurWorldConfig {
@@ -385,61 +380,186 @@ public class PurpurWorldConfig {
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
}
@@ -5761,7 +5761,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
public float giantStepHeight = 2.0F;
public float giantJumpHeight = 1.0F;
public double giantMovementSpeed = 0.5D;
@@ -438,6 +558,8 @@ public class PurpurWorldConfig {
@@ -448,6 +568,8 @@ public class PurpurWorldConfig {
public boolean giantHaveHostileAI = false;
public double giantMaxHealth = 100.0D;
private void giantSettings() {
@@ -5770,7 +5770,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
giantStepHeight = (float) getDouble("mobs.giant.step-height", giantStepHeight);
giantJumpHeight = (float) getDouble("mobs.giant.jump-height", giantJumpHeight);
giantMovementSpeed = getDouble("mobs.giant.movement-speed", giantMovementSpeed);
@@ -452,19 +574,44 @@ public class PurpurWorldConfig {
@@ -462,19 +584,44 @@ public class PurpurWorldConfig {
giantMaxHealth = getDouble("mobs.giant.attributes.max-health", giantMaxHealth);
}
@@ -5815,7 +5815,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
illusionerMovementSpeed = getDouble("mobs.illusioner.movement-speed", illusionerMovementSpeed);
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
if (PurpurConfig.version < 8) {
@@ -475,11 +622,76 @@ public class PurpurWorldConfig {
@@ -485,11 +632,76 @@ public class PurpurWorldConfig {
illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth);
}
@@ -5892,7 +5892,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
public double phantomAttackedByCrystalRadius = 0.0D;
public float phantomAttackedByCrystalDamage = 1.0F;
public double phantomOrbitCrystalRadius = 0.0D;
@@ -498,7 +710,13 @@ public class PurpurWorldConfig {
@@ -508,7 +720,13 @@ public class PurpurWorldConfig {
public int phantomBurnInLight = 0;
public boolean phantomIgnorePlayersWithTorch = false;
public boolean phantomBurnInDaylight = true;
@@ -5906,7 +5906,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
phantomAttackedByCrystalRadius = getDouble("mobs.phantom.attacked-by-crystal-range", phantomAttackedByCrystalRadius);
phantomAttackedByCrystalDamage = (float) getDouble("mobs.phantom.attacked-by-crystal-damage", phantomAttackedByCrystalDamage);
phantomOrbitCrystalRadius = getDouble("mobs.phantom.orbit-crystal-radius", phantomOrbitCrystalRadius);
@@ -517,42 +735,187 @@ public class PurpurWorldConfig {
@@ -527,42 +745,187 @@ 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);
@@ -6094,7 +6094,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
public int villagerBrainTicks = 1;
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
public boolean villagerCanBeLeashed = false;
@@ -562,6 +925,8 @@ public class PurpurWorldConfig {
@@ -572,6 +935,8 @@ public class PurpurWorldConfig {
public int villagerSpawnIronGolemLimit = 0;
public boolean villagerCanBreed = true;
private void villagerSettings() {
@@ -6103,7 +6103,7 @@ index cad6cd337bb0f4279dd22b012d32bc3070563a92..ad557e945364f0cd889e76513f67f717
villagerBrainTicks = getInt("mobs.villager.brain-ticks", villagerBrainTicks);
villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
@@ -572,45 +937,108 @@ public class PurpurWorldConfig {
@@ -582,45 +947,108 @@ public class PurpurWorldConfig {
villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
}