mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-19 11:44:59 +00:00
Telesphoreo
2edf8fa89b
Note that patch 10 had some changes so I took a guess on how to fix it. Needs testing most likely
27 lines
1015 B
Diff
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 f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4..c82934529463be0adeb8585e7f702aebaf2a6a97 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -407,11 +407,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
|