Scissors/patches/removed/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch
Telesphoreo 6b23f8bc8f Begin work on 1.19.3
Only got through one patch as of now. Not publishing JARs to Jenkins for now
2022-12-10 22:28:09 -06:00

27 lines
1015 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Luna <lunahatesgogle@gmail.com>
Date: Sun, 13 Mar 2022 14:38:38 -0300
Subject: [PATCH] ItemEntity - Check if items are air before calling setItem
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 c8d8fdef7b8abc0f59b7d19462825ae30c8d4f48..7126e0ccf894443f5f9c8e365dc1033daf20de57 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -409,11 +409,14 @@ public class ItemEntity extends Entity {
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
- this.setItem(ItemStack.of(nbttagcompound1));
+ // Scissors start
if (this.getItem().isEmpty()) {
this.discard();
+ return;
}
+ this.setItem(ItemStack.of(nbttagcompound1));
+ // Scissors end
}
@Override