mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Knowledgable books
- Fix crash when using LecternDisplayTarget
This commit is contained in:
parent
dacf3e1628
commit
5d9e13d43d
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.simibubi.create.content.redstone.displayLink.target;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.api.behaviour.display.DisplayTarget;
|
||||
|
@ -33,8 +34,8 @@ public class LecternDisplayTarget extends DisplayTarget {
|
|||
if (!book.is(Items.WRITTEN_BOOK))
|
||||
return;
|
||||
|
||||
WrittenBookContent writtenBookContent = book.get(DataComponents.WRITTEN_BOOK_CONTENT);
|
||||
List<Filterable<Component>> pages = writtenBookContent.pages();
|
||||
WrittenBookContent writtenBookContent = book.getOrDefault(DataComponents.WRITTEN_BOOK_CONTENT, WrittenBookContent.EMPTY);
|
||||
List<Filterable<Component>> pages = new ArrayList<>(writtenBookContent.pages());
|
||||
|
||||
boolean changed = false;
|
||||
for (int i = 0; i - line < text.size() && i < 50; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue