Record Class ContextNbtProvider.EntitySource
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider.EntitySource
- All Implemented Interfaces:
LootContextArg<Tag>, LootContextArg.Getter<Entity,Tag>
- Enclosing class:
ContextNbtProvider
private static record ContextNbtProvider.EntitySource(ContextKey<? extends Entity> contextParam)
extends Record
implements LootContextArg.Getter<Entity,Tag>
-
Nested Class Summary
Nested classes/interfaces inherited from interface LootContextArg
LootContextArg.ArgCodecBuilder<R>, LootContextArg.Getter<T,R>, LootContextArg.SimpleGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContextKey<? extends Entity> The field for thecontextParamrecord component.Fields inherited from interface LootContextArg
ENTITY_OR_BLOCK -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEntitySource(ContextKey<? extends Entity> contextParam) Creates an instance of aEntitySourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionContextKey<? extends Entity> Returns the value of thecontextParamrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface LootContextArg.Getter
get
-
Field Details
-
contextParam
The field for thecontextParamrecord component.
-
-
Constructor Details
-
EntitySource
Creates an instance of aEntitySourcerecord class.- Parameters:
contextParam- the value for thecontextParamrecord component
-
-
Method Details
-
get
-
toString
-
hashCode
-
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). -
contextParam
Returns the value of thecontextParamrecord component.- Specified by:
contextParamin interfaceLootContextArg<Tag>- Specified by:
contextParamin interfaceLootContextArg.Getter<Entity,Tag> - Returns:
- the value of the
contextParamrecord component
-