mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Add '*' as an option to item immunities
This commit is contained in:
@@ -94,10 +94,10 @@ index 228236bce14bfdf930570b453862dcfaae9e4823..ad06bd81eded5d60f16c2d0ad1a4390f
|
||||
int i;
|
||||
int j;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index c5193b394319fa68bedc6aa07b57fea24ac49d80..399e9b3e6289efe0fc5db274c10a5cad41d68909 100644
|
||||
index c5193b394319fa68bedc6aa07b57fea24ac49d80..9940bf351c05606137837ab2400ffe1a02b9bec2 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -101,6 +101,27 @@ public class PurpurWorldConfig {
|
||||
@@ -101,6 +101,39 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,16 +107,28 @@ index c5193b394319fa68bedc6aa07b57fea24ac49d80..399e9b3e6289efe0fc5db274c10a5cad
|
||||
+ private void itemSettings() {
|
||||
+ itemImmuneToCactus.clear();
|
||||
+ getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> {
|
||||
+ if (key.toString().equals("*")) {
|
||||
+ IRegistry.ITEM.g().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToCactus.add(item));
|
||||
+ return;
|
||||
+ }
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) itemImmuneToCactus.add(item);
|
||||
+ });
|
||||
+ itemImmuneToExplosion.clear();
|
||||
+ getList("gameplay-mechanics.item.immune.explosion", new ArrayList<>()).forEach(key -> {
|
||||
+ if (key.toString().equals("*")) {
|
||||
+ IRegistry.ITEM.g().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToExplosion.add(item));
|
||||
+ return;
|
||||
+ }
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) itemImmuneToExplosion.add(item);
|
||||
+ });
|
||||
+ itemImmuneToFire.clear();
|
||||
+ getList("gameplay-mechanics.item.immune.fire", new ArrayList<>()).forEach(key -> {
|
||||
+ if (key.toString().equals("*")) {
|
||||
+ IRegistry.ITEM.g().filter(item -> item != Items.AIR).forEach((item) -> itemImmuneToFire.add(item));
|
||||
+ return;
|
||||
+ }
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) itemImmuneToFire.add(item);
|
||||
+ });
|
||||
|
||||
Reference in New Issue
Block a user