2022-03-13 17:39:58 +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-04-19 23:49:48 +00:00
|
|
|
index f7d29950644a5cf12da0d31246d9f5fcbcc201bb..45866c9905cc607c58c398e675fe879e6e249398 100644
|
2022-03-13 17:39:58 +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-04-19 23:49:48 +00:00
|
|
|
@@ -378,11 +378,14 @@ public class ItemEntity extends Entity {
|
2022-03-13 17:39:58 +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
|