From eb28de7857f06295d03f637a4bb4de1d86f688f3 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Thu, 1 Aug 2019 15:30:51 -0500 Subject: [PATCH] Temporarily comment out NBT code so inventory doesn't bug out --- .../translators/item/ItemTranslator.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java index 78b8a2d8..a1fd9517 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java @@ -53,10 +53,12 @@ public class ItemTranslator { public ItemStack translateToJava(ItemData data) { JavaItem javaItem = getJavaItem(data); - if (data.getTag() == null) { - return new ItemStack(javaItem.getId(), data.getCount()); - } - return new ItemStack(javaItem.getId(), data.getCount(), translateToJavaNBT(data.getTag())); + // TODO: Fix NBT + // if (data.getTag() == null) { + // return new ItemStack(javaItem.getId(), data.getCount()); + // } + // return new ItemStack(javaItem.getId(), data.getCount(), translateToJavaNBT(data.getTag())); + return new ItemStack(javaItem.getId(), data.getCount()); } public ItemData translateToBedrock(ItemStack stack) { @@ -66,10 +68,13 @@ public class ItemTranslator { } BedrockItem bedrockItem = getBedrockItem(stack); - if (stack.getNBT() == null) { - return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount()); - } - return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount(), translateToBedrockNBT(stack.getNBT())); + + // TODO: Fix NBT + //if (stack.getNBT() == null) { + // return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount()); + // } + // return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount(), translateToBedrockNBT(stack.getNBT())); + return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount()); } public BedrockItem getBedrockItem(ItemStack stack) {