Record Class AddPoolLootTableModifier
java.lang.Object
java.lang.Record
com.petrolpark.core.data.loot.modifier.AddPoolLootTableModifier
- All Implemented Interfaces:
ILootModifierBase,ILootTableModifier
public record AddPoolLootTableModifier(net.minecraft.world.level.storage.loot.LootPool pool)
extends Record
implements ILootTableModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AddPoolLootTableModifier> Fields inherited from interface com.petrolpark.core.data.loot.modifier.ILootTableModifier
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAddPoolLootTableModifier(net.minecraft.world.level.storage.loot.LootPool pool) Creates an instance of aAddPoolLootTableModifierrecord 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.LootTablemodify(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable originalTable) net.minecraft.world.level.storage.loot.LootPoolpool()Returns the value of thepoolrecord 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, withPool
-
Field Details
-
CODEC
-
-
Constructor Details
-
AddPoolLootTableModifier
public AddPoolLootTableModifier(net.minecraft.world.level.storage.loot.LootPool pool) Creates an instance of aAddPoolLootTableModifierrecord class.- Parameters:
pool- the value for thepoolrecord component
-
-
Method Details
-
modify
public net.minecraft.world.level.storage.loot.LootTable modify(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable originalTable) - Specified by:
modifyin interfaceILootTableModifier
-
getType
- Specified by:
getTypein interfaceILootTableModifier
-
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). -
pool
public net.minecraft.world.level.storage.loot.LootPool pool()Returns the value of thepoolrecord component.- Returns:
- the value of the
poolrecord component
-