mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-26 22:55:39 +00:00
parent
95982e53d4
commit
06a169e968
@ -5,21 +5,23 @@ 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
|
||||
index f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4..2dad46159fb1653aff0ecdd907535ac0c59deeed 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 {
|
||||
@@ -407,11 +407,15 @@ public class ItemEntity extends Entity {
|
||||
|
||||
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
|
||||
|
||||
- this.setItem(ItemStack.of(nbttagcompound1));
|
||||
- if (this.getItem().isEmpty()) {
|
||||
+ // Scissors start
|
||||
if (this.getItem().isEmpty()) {
|
||||
+ ItemStack item = ItemStack.of(nbttagcompound1);
|
||||
+ if (item.isEmpty()) {
|
||||
this.discard();
|
||||
+ return;
|
||||
}
|
||||
|
||||
+ this.setItem(ItemStack.of(nbttagcompound1));
|
||||
+ this.setItem(item);
|
||||
+ // Scissors end
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user