Class LootItemKilledByPlayerCondition
java.lang.Object
net.minecraft.world.level.storage.loot.predicates.LootItemKilledByPlayerCondition
- All Implemented Interfaces:
Predicate<LootContext>, LootContextUser, LootItemCondition, Validatable
A LootItemCondition that matches if the last damage to an entity was done by a player.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface LootItemCondition
LootItemCondition.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final LootItemKilledByPlayerConditionstatic final com.mojang.serialization.MapCodec<LootItemKilledByPlayerCondition> Fields inherited from interface LootItemCondition
CODEC, DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<LootItemKilledByPlayerCondition> codec()Set<ContextKey<?>> static LootItemCondition.Builderbooleantest(LootContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LootContextUser
validate
-
Field Details
-
INSTANCE
-
MAP_CODEC
-
-
Constructor Details
-
LootItemKilledByPlayerCondition
private LootItemKilledByPlayerCondition()
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemCondition
-
getReferencedContextParams
- Specified by:
getReferencedContextParamsin interfaceLootContextUser
-
test
- Specified by:
testin interfacePredicate<LootContext>
-
killedByPlayer
-