Class CanToolPerformAction
java.lang.Object
net.neoforged.neoforge.common.loot.CanToolPerformAction
- All Implemented Interfaces:
Predicate<LootContext>
,LootContextUser
,LootItemCondition
This LootItemCondition "neoforge:can_tool_perform_action" can be used to check if a tool can perform a given ToolAction.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
LootItemCondition.Builder
-
Field Summary
Modifier and TypeFieldDescription(package private) final ToolAction
static com.mojang.serialization.MapCodec
<CanToolPerformAction> static final LootItemConditionType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LootItemCondition.Builder
canToolPerformAction
(ToolAction action) Set
<LootContextParam<?>> getType()
boolean
test
(LootContext lootContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
validate
-
Field Details
-
CODEC
-
LOOT_CONDITION_TYPE
-
action
-
-
Constructor Details
-
CanToolPerformAction
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceLootItemCondition
-
getReferencedContextParams
- Specified by:
getReferencedContextParams
in interfaceLootContextUser
-
test
- Specified by:
test
in interfacePredicate<LootContext>
-
canToolPerformAction
-