From 2fabcefb8de04529eeb2913455a684a330ff7215 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 26 Apr 2020 05:55:20 +0100 Subject: [PATCH] Fixed error when certain items are spawned from the creative inventory (#430) --- .../connector/network/translators/ItemStackTranslator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/ItemStackTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/ItemStackTranslator.java index ac4bb2f28..356dcf982 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/ItemStackTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/ItemStackTranslator.java @@ -54,7 +54,7 @@ public abstract class ItemStackTranslator { public ItemStack translateToJava(ItemData itemData, ItemEntry itemEntry) { if (itemData == null) return null; if (itemData.getTag() == null) { - return new ItemStack(itemEntry.getJavaId(), itemData.getCount()); + return new ItemStack(itemEntry.getJavaId(), itemData.getCount(), new com.github.steveice10.opennbt.tag.builtin.CompoundTag("")); } return new ItemStack(itemEntry.getJavaId(), itemData.getCount(), this.translateToJavaNBT(itemData.getTag())); }