mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +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 336d753bbd836e2a08207c5e3d41acbe2b72543f..23a9496188fb0b482d170ef906631df0e6e62fd3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -83,6 +83,17 @@ public class ItemEntity extends Entity {
|
|
this.bobOffs = entity.bobOffs;
|
|
}
|
|
|
|
+ // Sakura start
|
|
+ @Override
|
|
+ public boolean ignoreExplosion() {
|
|
+ if (this.level.sakuraConfig.explosionResistantItems.contains(this.getItem().getItem())) {
|
|
+ return true;
|
|
+ } else {
|
|
+ return super.ignoreExplosion();
|
|
+ }
|
|
+ }
|
|
+ // Sakura end
|
|
+
|
|
@Override
|
|
public boolean occludesVibrations() {
|
|
return this.getItem().is(ItemTags.OCCLUDES_VIBRATION_SIGNALS);
|