Record Class EntryAddAction
java.lang.Object
java.lang.Record
top.offsetmonkey538.loottablemodifier.common.api.resource.action.entry.EntryAddAction
- Record Components:
entries- the entries to add
- All Implemented Interfaces:
LootModifierAction
public record EntryAddAction(List<LootPoolEntry> entries)
extends Record
implements LootModifierAction
Adds the provided entries to matched pools
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface top.offsetmonkey538.loottablemodifier.common.api.resource.action.LootModifierAction
MODIFIED_ENTRY, MODIFIED_NONE, MODIFIED_POOL, MODIFIED_TABLE -
Constructor Summary
ConstructorsConstructorDescriptionEntryAddAction(List<LootPoolEntry> entries) Creates an instance of aEntryAddActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintapply(@NotNull LootModifierContext context) Applies this action to the provided contextstatic EntryAddAction.Builderbuilder()Creates a builder forEntryAddActionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()Returns the type of this action.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
EntryAddAction
Creates an instance of aEntryAddActionrecord class.- Parameters:
entries- the value for theentriesrecord component
-
-
Method Details
-
getType
Description copied from interface:LootModifierActionReturns the type of this action.- Specified by:
getTypein interfaceLootModifierAction- Returns:
- the
typeof this action.
-
apply
Description copied from interface:LootModifierActionApplies this action to the provided context- Specified by:
applyin interfaceLootModifierAction- Parameters:
context- the context to apply to- Returns:
- the applied modification level
- See Also:
-
builder
Creates a builder forEntryAddAction- Returns:
- a new
EntryAddAction.Builder
-
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). -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-