Record Class AddEntryLootPoolModifier
java.lang.Object
java.lang.Record
com.petrolpark.core.data.loot.modifier.AddEntryLootPoolModifier
- All Implemented Interfaces:
ILootModifierBase,ILootPoolModifier,ILootTableModifier
public record AddEntryLootPoolModifier(com.mojang.datafixers.util.Either<String,Integer> poolIdentifier, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entryContainer)
extends Record
implements ILootPoolModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AddEntryLootPoolModifier> Fields inherited from interface com.petrolpark.core.data.loot.modifier.ILootTableModifier
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAddEntryLootPoolModifier(com.mojang.datafixers.util.Either<String, Integer> poolIdentifier, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entryContainer) Creates an instance of aAddEntryLootPoolModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.storage.loot.entries.LootPoolEntryContainerReturns the value of theentryContainerrecord component.final 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.LootPool.BuildermodifyPool(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable lootTable, net.minecraft.world.level.storage.loot.LootPool pool) Returns the value of thepoolIdentifierrecord 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.ILootPoolModifier
modify
-
Field Details
-
CODEC
-
-
Constructor Details
-
AddEntryLootPoolModifier
public AddEntryLootPoolModifier(com.mojang.datafixers.util.Either<String, Integer> poolIdentifier, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entryContainer) Creates an instance of aAddEntryLootPoolModifierrecord class.- Parameters:
poolIdentifier- the value for thepoolIdentifierrecord componententryContainer- the value for theentryContainerrecord component
-
-
Method Details
-
modifyPool
public net.minecraft.world.level.storage.loot.LootPool.Builder modifyPool(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.world.level.storage.loot.LootTable lootTable, net.minecraft.world.level.storage.loot.LootPool pool) - Specified by:
modifyPoolin interfaceILootPoolModifier
-
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). -
poolIdentifier
Returns the value of thepoolIdentifierrecord component.- Specified by:
poolIdentifierin interfaceILootPoolModifier- Returns:
- the value of the
poolIdentifierrecord component
-
entryContainer
public net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entryContainer()Returns the value of theentryContainerrecord component.- Returns:
- the value of the
entryContainerrecord component
-