Package net.ixdarklord.folios.api.client
Record Class GuideReveal.Use
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideReveal.Use
- Enclosing interface:
- GuideReveal
public static record GuideReveal.Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread)
extends Record
A reveal: an effect, how long it takes in seconds, whether it plays only the first time each spread is seen this
game (
once; pages of entries read in an earlier game count as seen), and whether it plays only on spreads
the reader has never been shown in full (unread; kept with the player, or with the copy of a book that
keeps its own, so it doesn't play again after a restart or on another computer).-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUse(net.minecraft.resources.ResourceLocation effect, float seconds) Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once) Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread) Creates an instance of aUserecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationeffect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanonce()Returns the value of theoncerecord component.floatseconds()Returns the value of thesecondsrecord component.final StringtoString()Returns a string representation of this record class.booleanunread()Returns the value of theunreadrecord component.
-
Field Details
-
NONE
-
-
Constructor Details
-
Use
public Use(net.minecraft.resources.ResourceLocation effect, float seconds) -
Use
public Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once) -
Use
public Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread) Creates an instance of aUserecord class.- Parameters:
effect- the value for theeffectrecord componentseconds- the value for thesecondsrecord componentonce- the value for theoncerecord componentunread- the value for theunreadrecord component
-
-
Method Details
-
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 '=='. -
effect
public net.minecraft.resources.ResourceLocation effect()Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
seconds
public float seconds()Returns the value of thesecondsrecord component.- Returns:
- the value of the
secondsrecord component
-
once
public boolean once()Returns the value of theoncerecord component.- Returns:
- the value of the
oncerecord component
-
unread
public boolean unread()Returns the value of theunreadrecord component.- Returns:
- the value of the
unreadrecord component
-