mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 13:13:43 +01:00
Merge pull request #3794 from MoarDm/mc1.18/fix-3786
Fix: Game crash caused by Attribute Filter
This commit is contained in:
commit
e6d5048875
1 changed files with 5 additions and 0 deletions
|
@ -56,6 +56,11 @@ public class BookCopyAttribute implements ItemAttribute {
|
||||||
return new BookCopyAttribute(nbt.getInt("generation"));
|
return new BookCopyAttribute(nbt.getInt("generation"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNBTKey() {
|
||||||
|
return "book_copy";
|
||||||
|
}
|
||||||
|
|
||||||
private int extractGeneration(ItemStack stack) {
|
private int extractGeneration(ItemStack stack) {
|
||||||
CompoundTag nbt = stack.getTag();
|
CompoundTag nbt = stack.getTag();
|
||||||
if (nbt != null && stack.getItem() instanceof WrittenBookItem) {
|
if (nbt != null && stack.getItem() instanceof WrittenBookItem) {
|
||||||
|
|
Loading…
Reference in a new issue