Class CanItemPerformAbility
java.lang.Object
net.neoforged.neoforge.common.loot.CanItemPerformAbility
- All Implemented Interfaces:
Predicate<LootContext>,LootContextUser,LootItemCondition
This LootItemCondition "neoforge:can_item_perform_ability" can be used to check if an item can perform a given ItemAbility.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
LootItemCondition.Builder -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ItemAbilitystatic com.mojang.serialization.MapCodec<CanItemPerformAbility> static final LootItemConditionTypeFields inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LootItemCondition.BuildercanItemPerformAbility(ItemAbility action) Set<ContextKey<?>> getType()booleantest(LootContext lootContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
validate
-
Field Details
-
CODEC
-
LOOT_CONDITION_TYPE
-
ability
-
-
Constructor Details
-
CanItemPerformAbility
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootItemCondition
-
getReferencedContextParams
- Specified by:
getReferencedContextParamsin interfaceLootContextUser
-
test
- Specified by:
testin interfacePredicate<LootContext>
-
canItemPerformAbility
-