Skip to content

Commit

Permalink
fixed contributor book
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke100000 committed May 17, 2024
1 parent 719fa17 commit 1961caa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 7.5.18

* Updated contributor book

# 7.5.17

* Now its compatible with Cobblemon!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@

public class CenteredListPage extends ListPage {
final Text title;
final List<Text> text;

int page;

public static final int ENTRIES_PER_PAGE = 11;

public CenteredListPage(Text title, List<Text> text) {
super(text);

this.title = title;
this.text = text;
}

public CenteredListPage(String title, List<Text> text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public abstract class ListPage extends Page {
public ListPage() {
this.text = new LinkedList<>();
}

public ListPage(List<Text> text) {
this.text = text;
}
Expand Down
8 changes: 4 additions & 4 deletions common/src/main/java/net/mca/item/ItemsMCA.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public interface ItemsMCA {
RegistrySupplier<Item> BOOK_SUPPORTERS = register("book_supporters", () -> new ExtendedWrittenBookItem(baseProps(), new Book("supporters")
.setBackground(MCA.locate("textures/gui/books/supporters.png"))
.addPage(new TitlePage("supporters"))
.addPage(new DynamicListPage("mca.books.supporters.patrons",
page -> Supporters.getSupporterGroup("mca:patrons").stream().map(s -> Text.literal(s).formatted(Formatting.RED)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.wiki",
page -> Supporters.getSupporterGroup("mca:wiki").stream().map(s -> Text.literal(s).formatted(Formatting.GOLD)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.contributors",
page -> Supporters.getSupporterGroup("mca:contributors").stream().map(s -> Text.literal(s).formatted(Formatting.DARK_GREEN)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.wiki",
page -> Supporters.getSupporterGroup("mca:wiki").stream().map(s -> Text.literal(s).formatted(Formatting.GOLD)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.patrons",
page -> Supporters.getSupporterGroup("mca:patrons").stream().map(s -> Text.literal(s).formatted(Formatting.RED)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.translators",
page -> Supporters.getSupporterGroup("mca:translators").stream().map(s -> Text.literal(s).formatted(Formatting.DARK_BLUE)).collect(Collectors.toList())))
.addPage(new DynamicListPage("mca.books.supporters.old",
Expand Down

0 comments on commit 1961caa

Please sign in to comment.