forked from GeyserMC/Geyser
Temporarily comment out NBT code so inventory doesn't bug out
This commit is contained in:
parent
6297d95d05
commit
eb28de7857
1 changed files with 13 additions and 8 deletions
|
@ -53,10 +53,12 @@ public class ItemTranslator {
|
||||||
public ItemStack translateToJava(ItemData data) {
|
public ItemStack translateToJava(ItemData data) {
|
||||||
JavaItem javaItem = getJavaItem(data);
|
JavaItem javaItem = getJavaItem(data);
|
||||||
|
|
||||||
if (data.getTag() == null) {
|
// TODO: Fix NBT
|
||||||
return new ItemStack(javaItem.getId(), data.getCount());
|
// 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(), translateToJavaNBT(data.getTag()));
|
||||||
|
return new ItemStack(javaItem.getId(), data.getCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemData translateToBedrock(ItemStack stack) {
|
public ItemData translateToBedrock(ItemStack stack) {
|
||||||
|
@ -66,10 +68,13 @@ public class ItemTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
BedrockItem bedrockItem = getBedrockItem(stack);
|
BedrockItem bedrockItem = getBedrockItem(stack);
|
||||||
if (stack.getNBT() == null) {
|
|
||||||
return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount());
|
// TODO: Fix NBT
|
||||||
}
|
//if (stack.getNBT() == null) {
|
||||||
return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount(), translateToBedrockNBT(stack.getNBT()));
|
// 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) {
|
public BedrockItem getBedrockItem(ItemStack stack) {
|
||||||
|
|
Loading…
Reference in a new issue