mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
Resolve #286 - Add config and API for item immunity to lightning
This commit is contained in:
@@ -22,21 +22,21 @@ index f55485094a5b676d8051d1f8d3151340bf176b33..03a61aa91191b44284e9b4d02f2c57ea
|
||||
this.o = this.player.locX();
|
||||
this.p = this.player.locY();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 5f1f3403351503e08c71486571439b672936a1be..e9b77536de0ce19afc00d28996837cdb83cda689 100644
|
||||
index b2d7e4ee4ecef476d633278c960130110c862520..02ebb0fc704b5e77cf508893d67feef036df80ed 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -202,6 +202,8 @@ public class PurpurWorldConfig {
|
||||
public List<Item> itemImmuneToCactus = new ArrayList<>();
|
||||
@@ -203,6 +203,8 @@ public class PurpurWorldConfig {
|
||||
public List<Item> itemImmuneToExplosion = new ArrayList<>();
|
||||
public List<Item> itemImmuneToFire = new ArrayList<>();
|
||||
public List<Item> itemImmuneToLightning = new ArrayList<>();
|
||||
+ public boolean dontRunWithScissors = false;
|
||||
+ public double scissorsRunningDamage = 1D;
|
||||
private void itemSettings() {
|
||||
itemImmuneToCactus.clear();
|
||||
getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> {
|
||||
@@ -230,6 +232,8 @@ public class PurpurWorldConfig {
|
||||
@@ -240,6 +242,8 @@ public class PurpurWorldConfig {
|
||||
Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
if (item != Items.AIR) itemImmuneToFire.add(item);
|
||||
if (item != Items.AIR) itemImmuneToLightning.add(item);
|
||||
});
|
||||
+ dontRunWithScissors = getBoolean("gameplay-mechanics.item.shears.damage-if-sprinting", dontRunWithScissors);
|
||||
+ scissorsRunningDamage = getDouble("gameplay-mechanics.item.shears.sprinting-damage", scissorsRunningDamage);
|
||||
|
||||
Reference in New Issue
Block a user