Record Class ModifyPoolEntryLootTableModifier
java.lang.Object
java.lang.Record
com.petrolpark.core.data.loot.modifier.ModifyPoolEntryLootTableModifier
- All Implemented Interfaces:
ILootModifierBase,ILootPoolModifier,ILootTableModifier
public record ModifyPoolEntryLootTableModifier(com.mojang.datafixers.util.Either<String,Integer> poolIdentifier, com.google.gson.JsonElement entryIdentifier, ILootPoolEntryModifier modifier)
extends Record
implements ILootPoolModifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ModifyPoolEntryLootTableModifier> Fields inherited from interface com.petrolpark.core.data.loot.modifier.ILootTableModifier
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionModifyPoolEntryLootTableModifier(com.mojang.datafixers.util.Either<String, Integer> poolIdentifier, com.google.gson.JsonElement entryIdentifier, ILootPoolEntryModifier modifier) Creates an instance of aModifyPoolEntryLootTableModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElementReturns the value of theentryIdentifierrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.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
-
ModifyPoolEntryLootTableModifier
public ModifyPoolEntryLootTableModifier(com.mojang.datafixers.util.Either<String, Integer> poolIdentifier, com.google.gson.JsonElement entryIdentifier, ILootPoolEntryModifier modifier) Creates an instance of aModifyPoolEntryLootTableModifierrecord class.- Parameters:
poolIdentifier- the value for thepoolIdentifierrecord componententryIdentifier- the value for theentryIdentifierrecord componentmodifier- the value for themodifierrecord 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
-
entryIdentifier
public com.google.gson.JsonElement entryIdentifier()Returns the value of theentryIdentifierrecord component.- Returns:
- the value of the
entryIdentifierrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-