Enum Class LootContext.EntityTarget
java.lang.Object
java.lang.Enum<LootContext.EntityTarget>
net.minecraft.world.level.storage.loot.LootContext.EntityTarget
- All Implemented Interfaces:
Serializable, Comparable<LootContext.EntityTarget>, Constable, StringRepresentable, LootContextArg<Entity>, LootContextArg.SimpleGetter<Entity>
- Enclosing class:
LootContext
public static enum LootContext.EntityTarget
extends Enum<LootContext.EntityTarget>
implements StringRepresentable, LootContextArg.SimpleGetter<Entity>
Represents a type of entity that can be looked up in a
.
LootContext using a
invalid reference
LootContextParam
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface LootContextArg
LootContextArg.ArgCodecBuilder<R>, LootContextArg.Getter<T,R>, LootContextArg.SimpleGetter<T> Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRepresentable.EnumCodec<LootContext.EntityTarget> private final Stringprivate final ContextKey<? extends Entity> Fields inherited from interface LootContextArg
ENTITY_OR_BLOCKFields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEntityTarget(String name, ContextKey<? extends Entity> param) -
Method Summary
Modifier and TypeMethodDescriptionContextKey<? extends Entity> static LootContext.EntityTargetgetName()static LootContext.EntityTargetReturns the enum constant of this class with the specified name.static LootContext.EntityTarget[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface LootContextArg.SimpleGetter
get
-
Enum Constant Details
-
THIS
Looks upLootContextParams.THIS_ENTITY. -
ATTACKER
-
DIRECT_ATTACKER
-
ATTACKING_PLAYER
-
TARGET_ENTITY
-
INTERACTING_ENTITY
-
-
Field Details
-
CODEC
-
name
-
param
-
-
Constructor Details
-
EntityTarget
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
contextParam
- Specified by:
contextParamin interfaceLootContextArg<Entity>- Specified by:
contextParamin interfaceLootContextArg.SimpleGetter<Entity>
-
getName
-
getByName
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-