Record Class LootModifierContext
java.lang.Object
java.lang.Record
top.offsetmonkey538.loottablemodifier.common.api.resource.util.LootModifierContext
- Record Components:
table- the tabletableId- the id of the tablepool- the poolentry- the entrytableAlreadyModified- if the table has already been modified by the current actionpoolAlreadyModified- if the pool has already been modified by the current action
public record LootModifierContext(@NotNull LootTable table, @NotNull top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier tableId, @Nullable LootPool pool, @Nullable LootPoolEntry entry, boolean tableAlreadyModified, boolean poolAlreadyModified)
extends Record
A context for predicates to match against and actions to modify.
-
Constructor Summary
ConstructorsConstructorDescriptionLootModifierContext(@NotNull LootTable table, @NotNull top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier tableId, @Nullable LootPool pool, @Nullable LootPoolEntry entry, boolean tableAlreadyModified, boolean poolAlreadyModified) Creates an instance of aLootModifierContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable LootPoolEntryentry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable LootPoolpool()Returns the value of thepoolrecord component.booleanReturns the value of thepoolAlreadyModifiedrecord component.@NotNull LootTabletable()Returns the value of thetablerecord component.booleanReturns the value of thetableAlreadyModifiedrecord component.@NotNull top.offsetmonkey538.monkeylib538.common.api.wrapper.IdentifiertableId()Returns the value of thetableIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LootModifierContext
public LootModifierContext(@NotNull @NotNull LootTable table, @NotNull @NotNull top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier tableId, @Nullable @Nullable LootPool pool, @Nullable @Nullable LootPoolEntry entry, boolean tableAlreadyModified, boolean poolAlreadyModified) Creates an instance of aLootModifierContextrecord class.- Parameters:
table- the value for thetablerecord componenttableId- the value for thetableIdrecord componentpool- the value for thepoolrecord componententry- the value for theentryrecord componenttableAlreadyModified- the value for thetableAlreadyModifiedrecord componentpoolAlreadyModified- the value for thepoolAlreadyModifiedrecord 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 '=='. -
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
tableId
@NotNull public @NotNull top.offsetmonkey538.monkeylib538.common.api.wrapper.Identifier tableId()Returns the value of thetableIdrecord component.- Returns:
- the value of the
tableIdrecord component
-
pool
Returns the value of thepoolrecord component.- Returns:
- the value of the
poolrecord component
-
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-
tableAlreadyModified
public boolean tableAlreadyModified()Returns the value of thetableAlreadyModifiedrecord component.- Returns:
- the value of the
tableAlreadyModifiedrecord component
-
poolAlreadyModified
public boolean poolAlreadyModified()Returns the value of thepoolAlreadyModifiedrecord component.- Returns:
- the value of the
poolAlreadyModifiedrecord component
-