Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Temporarily comment out NBT code so inventory doesn't bug out
Dieser Commit ist enthalten in:
Ursprung
6297d95d05
Commit
eb28de7857
@ -53,11 +53,13 @@ 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
|
||||||
|
// 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());
|
return new ItemStack(javaItem.getId(), data.getCount());
|
||||||
}
|
}
|
||||||
return new ItemStack(javaItem.getId(), data.getCount(), translateToJavaNBT(data.getTag()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemData translateToBedrock(ItemStack stack) {
|
public ItemData translateToBedrock(ItemStack stack) {
|
||||||
// Most likely air if null
|
// Most likely air if null
|
||||||
@ -66,11 +68,14 @@ public class ItemTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BedrockItem bedrockItem = getBedrockItem(stack);
|
BedrockItem bedrockItem = getBedrockItem(stack);
|
||||||
if (stack.getNBT() == null) {
|
|
||||||
|
// 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());
|
return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount());
|
||||||
}
|
}
|
||||||
return ItemData.of(bedrockItem.getId(), (short) bedrockItem.getData(), stack.getAmount(), translateToBedrockNBT(stack.getNBT()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public BedrockItem getBedrockItem(ItemStack stack) {
|
public BedrockItem getBedrockItem(ItemStack stack) {
|
||||||
for (Map.Entry<String, JavaItem> javaItems : Toolbox.JAVA_ITEMS.entrySet()) {
|
for (Map.Entry<String, JavaItem> javaItems : Toolbox.JAVA_ITEMS.entrySet()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren