Skip stripping metadata from empty stacks (#6973)

This commit is contained in:
Jake Potrebic 2021-11-30 18:59:09 -08:00
parent 77e275cff4
commit b1687cbed4

View File

@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ public static void stripMeta(ItemStack itemStack, @org.jetbrains.annotations.Nullable Level level) {
+ if (itemStack.getTag() != null) {
+ if (itemStack.getTag() != null && !itemStack.isEmpty()) {
+ CompoundTag nbt = itemStack.getTag();
+ if (level != null && level.paperConfig.hideDurabilityFromClients) {
+ // Only show damage values for elytra's, since they show a different texture when broken.