Merge pull request #3794 from MoarDm/mc1.18/fix-3786

Fix: Game crash caused by Attribute Filter
This commit is contained in:
simibubi 2022-09-22 19:47:16 +02:00 committed by GitHub
commit e6d5048875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {