From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Luna 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 ae4b251e10babb07055d031ff48ac7dd5d4be4a0..36d57256c50fbd5e60c755ea47b608137d92ea50 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -385,11 +385,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