mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Fix last commit :3
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
From 53ba13952b4beee3685e0b029c404df59310b974 Mon Sep 17 00:00:00 2001
|
||||
From a156ba8ddc37e18eab14d265cacf4940c596cfa6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 22 Feb 2020 15:54:08 -0600
|
||||
Subject: [PATCH] Add item entity options
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/Entity.java | 1 +
|
||||
src/main/java/net/minecraft/server/EntityItem.java | 4 +++-
|
||||
.../java/net/pl3x/purpur/PurpurWorldConfig.java | 13 +++++++++++++
|
||||
3 files changed, 17 insertions(+), 1 deletion(-)
|
||||
src/main/java/net/minecraft/server/Entity.java | 1 +
|
||||
.../java/net/minecraft/server/EntityItem.java | 4 +++-
|
||||
.../java/net/pl3x/purpur/PurpurWorldConfig.java | 15 +++++++++++++++
|
||||
3 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7a4cc7c30..476ca65a4 100644
|
||||
@@ -44,22 +44,24 @@ index a7860cb4d..77e970c30 100644
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index edfb64bc5..7c8735e52 100644
|
||||
index 19e87de9f..b756a95e6 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -99,6 +99,19 @@ public class PurpurWorldConfig {
|
||||
@@ -99,6 +99,21 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public List<Item> itemImmuneToExplosion = new ArrayList<>();
|
||||
+ public List<Item> itemImmuneToFire = new ArrayList<>();
|
||||
+ private void itemSettings() {
|
||||
+ getList("gameplay-mechanics.item.immune.explosion", itemImmuneToExplosion).forEach(key -> {
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey((String) key));
|
||||
+ itemImmuneToExplosion.clear();
|
||||
+ getList("gameplay-mechanics.item.immune.explosion", new ArrayList<>()).forEach(key -> {
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) itemImmuneToExplosion.add(item);
|
||||
+ });
|
||||
+ getList("gameplay-mechanics.item.immune.fire", itemImmuneToFire).forEach(key -> {
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey((String) key));
|
||||
+ itemImmuneToFire.clear();
|
||||
+ getList("gameplay-mechanics.item.immune.fire", new ArrayList<>()).forEach(key -> {
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) itemImmuneToFire.add(item);
|
||||
+ });
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user