Record Class SpreadPage
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.page.SpreadPage
- All Implemented Interfaces:
GuidePage
public record SpreadPage(Optional<String> title, String text, Optional<net.minecraft.resources.ResourceLocation> image, Optional<SpreadPage.Build> build, Optional<SpreadPage.MapLayout> map, int height)
extends Record
implements GuidePage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA build in the window: a multiblock page's pattern and mapping.static final recordThe map: its places, the paths between them (pairs of ids), and a picture under them.static final recordA place on the map: where it is in the window, what it shows, and the entry it opens.Nested classes/interfaces inherited from interface net.ixdarklord.folios.api.client.page.GuidePage
GuidePage.Laid, GuidePage.SpreadHalf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpreadPage(Optional<String> title, String text, Optional<net.minecraft.resources.ResourceLocation> image, Optional<SpreadPage.Build> build, Optional<SpreadPage.MapLayout> map, int height) Creates an instance of aSpreadPagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the value of thebuildrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Optional<net.minecraft.resources.ResourceLocation>image()Returns the value of theimagerecord component.lay(GuideLayout layout) Sets the page out: one or more pages, each drawn on its own.map()Returns the value of themaprecord component.Words of the page a search should find it by.booleanspread()Whether the page spreads over both pages of an open book: its laid pages then come in pairs, a left page and the right page beside it, and it starts on a left page (an empty page is put before it if need be).text()Returns the value of thetextrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ixdarklord.folios.api.client.page.GuidePage
items, objectives
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpreadPage
public SpreadPage(Optional<String> title, String text, Optional<net.minecraft.resources.ResourceLocation> image, Optional<SpreadPage.Build> build, Optional<SpreadPage.MapLayout> map, int height) Creates an instance of aSpreadPagerecord class.- Parameters:
title- the value for thetitlerecord componenttext- the value for thetextrecord componentimage- the value for theimagerecord componentbuild- the value for thebuildrecord componentmap- the value for themaprecord componentheight- the value for theheightrecord component
-
-
Method Details
-
spread
public boolean spread()Description copied from interface:GuidePageWhether the page spreads over both pages of an open book: its laid pages then come in pairs, a left page and the right page beside it, and it starts on a left page (an empty page is put before it if need be). -
lay
Description copied from interface:GuidePageSets the page out: one or more pages, each drawn on its own. -
searchText
Description copied from interface:GuidePageWords of the page a search should find it by.- Specified by:
searchTextin interfaceGuidePage
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
build
Returns the value of thebuildrecord component.- Returns:
- the value of the
buildrecord component
-
map
Returns the value of themaprecord component.- Returns:
- the value of the
maprecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-