Record Class SetQualityLootPoolEntryModifier
java.lang.Object
java.lang.Record
com.petrolpark.core.data.loot.modifier.SetQualityLootPoolEntryModifier
- All Implemented Interfaces:
ILootModifierBase,ILootPoolEntryModifier,ILootPoolSingletonEntryModifier
public record SetQualityLootPoolEntryModifier(int quality)
extends Record
implements ILootPoolSingletonEntryModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SetQualityLootPoolEntryModifier> Fields inherited from interface com.petrolpark.core.data.loot.modifier.ILootPoolEntryModifier
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSetQualityLootPoolEntryModifier(int quality) Creates an instance of aSetQualityLootPoolEntryModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainermodifySingleton(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable lootTable, net.minecraft.world.level.storage.loot.LootPool pool, net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer entry) intquality()Returns the value of thequalityrecord 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 com.petrolpark.core.data.loot.modifier.ILootModifierBase
add, apply, apply, copy, copy, getConditions, getEntries, getFunctions, getFunctions, getPools, getRandomSequence, when, withPoolMethods inherited from interface com.petrolpark.core.data.loot.modifier.ILootPoolSingletonEntryModifier
modify
-
Field Details
-
CODEC
-
-
Constructor Details
-
SetQualityLootPoolEntryModifier
public SetQualityLootPoolEntryModifier(int quality) Creates an instance of aSetQualityLootPoolEntryModifierrecord class.- Parameters:
quality- the value for thequalityrecord component
-
-
Method Details
-
modifySingleton
public net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer modifySingleton(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable lootTable, net.minecraft.world.level.storage.loot.LootPool pool, net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer entry) - Specified by:
modifySingletonin interfaceILootPoolSingletonEntryModifier
-
getType
- Specified by:
getTypein interfaceILootPoolEntryModifier
-
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 with '=='. -
quality
public int quality()Returns the value of thequalityrecord component.- Returns:
- the value of the
qualityrecord component
-