mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 07:49:29 +00:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Hermelijn15 <j.s.dekker-1@student.utwente.nl>
|
|
Date: Fri, 17 Nov 2023 20:09:03 +0100
|
|
Subject: [PATCH] Added list of ItemEntity's that ignore explosions
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
index eb0351aa12eebcefab1d1d14641fc3c60cbbcab8..92c8cae1709052ec09715b6f27e6b0199762a00e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -559,6 +559,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
|
|
|
}
|
|
|
|
+ // Sakura start
|
|
+ @Override
|
|
+ public boolean ignoreExplosion() {
|
|
+ if (this.level().sakuraConfig().entity.items.explosionResistantItems.contains(this.getItem().getItem())) {
|
|
+ return true;
|
|
+ } else {
|
|
+ return super.ignoreExplosion();
|
|
+ }
|
|
+ }
|
|
+ // Sakura end
|
|
+
|
|
public void setTarget(@Nullable UUID owner) {
|
|
this.target = owner;
|
|
}
|