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

@@ -43,11 +43,11 @@ index 9896d77381e7fadf1ef2619210713e190c1445d0..61512c6755f29cb2c228ae3e80b1e083
// Paper end
if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index cd5deda81433a9ac738e3598e3d0bddd697756ec..c0d75601fb8fe1221bbd47433174ceb14c70755f 100644
index 8cf40f10dccd9b4f52507e432dcfd6b2015e90f2..129fef2e4da94bcd80153379a7246590e4ea9cdd 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -204,6 +204,10 @@ public class PurpurWorldConfig {
public List<Item> itemImmuneToFire = new ArrayList<>();
@@ -205,6 +205,10 @@ public class PurpurWorldConfig {
public List<Item> itemImmuneToLightning = new ArrayList<>();
public boolean dontRunWithScissors = false;
public double scissorsRunningDamage = 1D;
+ public float enderPearlDamage = 5.0F;
@@ -57,7 +57,7 @@ index cd5deda81433a9ac738e3598e3d0bddd697756ec..c0d75601fb8fe1221bbd47433174ceb1
private void itemSettings() {
itemImmuneToCactus.clear();
getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> {
@@ -234,6 +238,10 @@ public class PurpurWorldConfig {
@@ -244,6 +248,10 @@ public class PurpurWorldConfig {
});
dontRunWithScissors = getBoolean("gameplay-mechanics.item.shears.damage-if-sprinting", dontRunWithScissors);
scissorsRunningDamage = getDouble("gameplay-mechanics.item.shears.sprinting-damage", scissorsRunningDamage);