Fix: Game crash caused by Attribute Filter #3786

This commit is contained in:
MoarDm 2022-09-17 19:22:22 +03:00
parent aeee9f8793
commit 9a8415e97c

View file

@ -56,6 +56,11 @@ public class BookCopyAttribute implements ItemAttribute {
return new BookCopyAttribute(nbt.getInt("generation"));
}
@Override
public String getNBTKey() {
return "book_copy";
}
private int extractGeneration(ItemStack stack) {
CompoundTag nbt = stack.getTag();
if (nbt != null && stack.getItem() instanceof WrittenBookItem) {