Fixed error when certain items are spawned from the creative inventory (#430)

This commit is contained in:
rtm516 2020-04-26 05:55:20 +01:00 committed by GitHub
parent 257918904b
commit 2fabcefb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ public abstract class ItemStackTranslator {
public ItemStack translateToJava(ItemData itemData, ItemEntry itemEntry) { public ItemStack translateToJava(ItemData itemData, ItemEntry itemEntry) {
if (itemData == null) return null; if (itemData == null) return null;
if (itemData.getTag() == 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())); return new ItemStack(itemEntry.getJavaId(), itemData.getCount(), this.translateToJavaNBT(itemData.getTag()));
} }