2022-07-28 03:57:50 +00:00
|
|
|
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
|
2022-11-26 04:34:27 +00:00
|
|
|
index c8d8fdef7b8abc0f59b7d19462825ae30c8d4f48..7126e0ccf894443f5f9c8e365dc1033daf20de57 100644
|
2022-07-28 03:57:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
2022-11-26 04:34:27 +00:00
|
|
|
@@ -409,11 +409,14 @@ public class ItemEntity extends Entity {
|
2022-07-28 03:57:50 +00:00
|
|
|
|
|
|
|
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
|