From 1961caa5aade1e8d91b4b654af96d8b03b08ca25 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Fri, 17 May 2024 18:47:51 +0200 Subject: [PATCH] fixed contributor book --- changelog.md | 4 ++++ .../java/net/mca/client/book/pages/CenteredListPage.java | 6 ++---- .../src/main/java/net/mca/client/book/pages/ListPage.java | 1 + common/src/main/java/net/mca/item/ItemsMCA.java | 8 ++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/changelog.md b/changelog.md index 3c379ff328..f57191832c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 7.5.18 + +* Updated contributor book + # 7.5.17 * Now its compatible with Cobblemon! diff --git a/common/src/main/java/net/mca/client/book/pages/CenteredListPage.java b/common/src/main/java/net/mca/client/book/pages/CenteredListPage.java index 6828d22607..2b48304059 100644 --- a/common/src/main/java/net/mca/client/book/pages/CenteredListPage.java +++ b/common/src/main/java/net/mca/client/book/pages/CenteredListPage.java @@ -11,15 +11,13 @@ public class CenteredListPage extends ListPage { final Text title; - final List text; - - int page; public static final int ENTRIES_PER_PAGE = 11; public CenteredListPage(Text title, List text) { + super(text); + this.title = title; - this.text = text; } public CenteredListPage(String title, List text) { diff --git a/common/src/main/java/net/mca/client/book/pages/ListPage.java b/common/src/main/java/net/mca/client/book/pages/ListPage.java index c6d8e87c4b..6152b7ba48 100644 --- a/common/src/main/java/net/mca/client/book/pages/ListPage.java +++ b/common/src/main/java/net/mca/client/book/pages/ListPage.java @@ -13,6 +13,7 @@ public abstract class ListPage extends Page { public ListPage() { this.text = new LinkedList<>(); } + public ListPage(List text) { this.text = text; } diff --git a/common/src/main/java/net/mca/item/ItemsMCA.java b/common/src/main/java/net/mca/item/ItemsMCA.java index afb6f689e5..cd576fffce 100644 --- a/common/src/main/java/net/mca/item/ItemsMCA.java +++ b/common/src/main/java/net/mca/item/ItemsMCA.java @@ -110,12 +110,12 @@ public interface ItemsMCA { RegistrySupplier 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",