Package dev.itsharshxd.zentrix.api.loot
Record Class LootTablePreview
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.loot.LootTablePreview
public record LootTablePreview(@NotNull List<LootEntry> entries, @NotNull Optional<String> failureDetail)
extends Record
Parsed or sampled entries from one local or native loot table.
-
Constructor Summary
ConstructorsConstructorDescriptionLootTablePreview(@NotNull List<LootEntry> entries, @NotNull Optional<String> failureDetail) Creates an instance of aLootTablePreviewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureDetailrecord component.final inthashCode()Returns a hash code value for this object.booleansuccess()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LootTablePreview
public LootTablePreview(@NotNull @NotNull List<LootEntry> entries, @NotNull @NotNull Optional<String> failureDetail) Creates an instance of aLootTablePreviewrecord class.- Parameters:
entries- the value for theentriesrecord componentfailureDetail- the value for thefailureDetailrecord component
-
-
Method Details
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
success
public boolean success() -
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. All components in this record class are compared withObjects::equals(Object,Object). -
failureDetail
Returns the value of thefailureDetailrecord component.- Returns:
- the value of the
failureDetailrecord component
-