Class CapabilityAnimation.DefaultItemAnimationCapabilityProvider
- java.lang.Object
-
- net.minecraftforge.common.model.animation.CapabilityAnimation.DefaultItemAnimationCapabilityProvider
-
- All Implemented Interfaces:
ICapabilityProvider
- Enclosing class:
- CapabilityAnimation
public static class CapabilityAnimation.DefaultItemAnimationCapabilityProvider extends java.lang.Object implements ICapabilityProvider
-
-
Field Summary
Fields Modifier and Type Field Description private LazyOptional<IAnimationStateMachine>
asm
-
Constructor Summary
Constructors Constructor Description DefaultItemAnimationCapabilityProvider(LazyOptional<IAnimationStateMachine> asm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> LazyOptional<T>
getCapability(Capability<T> capability, Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
-
-
-
Field Detail
-
asm
@Nonnull private final LazyOptional<IAnimationStateMachine> asm
-
-
Constructor Detail
-
DefaultItemAnimationCapabilityProvider
public DefaultItemAnimationCapabilityProvider(@Nonnull LazyOptional<IAnimationStateMachine> asm)
-
-
Method Detail
-
getCapability
@Nonnull public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> capability, @Nullable Direction facing)
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Returns:
- The requested an optional holding the requested capability.
-
-