Interface ICapabilityProvider
- All Known Subinterfaces:
ICapabilityProviderImpl<B>
,ICapabilitySerializable<T>
,IForgeBlockEntity
,IForgeEntity
,IForgeItemStack
,IForgeLevel
,IForgeLevelChunk
- All Known Implementing Classes:
AbstractArrow
,AbstractChestedHorse
,AbstractClientPlayer
,AbstractFish
,AbstractFurnaceBlockEntity
,AbstractGolem
,AbstractHorse
,AbstractHurtingProjectile
,AbstractIllager
,AbstractMinecart
,AbstractMinecartContainer
,AbstractPiglin
,AbstractSchoolingFish
,AbstractSkeleton
,AbstractVillager
,AgeableMob
,AmbientCreature
,Animal
,AreaEffectCloud
,ArmorStand
,Arrow
,Axolotl
,BannerBlockEntity
,BarrelBlockEntity
,BaseContainerBlockEntity
,Bat
,BeaconBlockEntity
,BedBlockEntity
,Bee
,BeehiveBlockEntity
,BellBlockEntity
,BlastFurnaceBlockEntity
,Blaze
,BlockEntity
,BlockEntityOnLoadTest.TestBlockEntity
,Boat
,BrewingStandBlockEntity
,CampfireBlockEntity
,CapabilityDispatcher
,CapabilityProvider
,CapabilityProvider.AsField
,Cat
,CaveSpider
,ChestBlockEntity
,Chicken
,ClientLevel
,Cod
,CommandBlockEntity
,ComparatorBlockEntity
,ConduitBlockEntity
,Cow
,Creeper
,CustomHeadTest.CustomSkullBlockEntity
,CustomSignsTest.CustomSignBlockEntity
,CustomTransformTypeTest.ItemHangerBlockEntity
,DaylightDetectorBlockEntity
,DispenserBlockEntity
,Dolphin
,Donkey
,DragonFireball
,DropperBlockEntity
,Drowned
,ElderGuardian
,EmptyLevelChunk
,EnchantmentTableBlockEntity
,EndCrystal
,EnderChestBlockEntity
,EnderDragon
,EnderDragonPart
,EnderMan
,Endermite
,Entity
,EntityRendererEventsTest.MyEntity
,Evoker
,EvokerFangs
,ExperienceOrb
,EyeOfEnder
,FakePlayer
,FallingBlockEntity
,Fireball
,FireworkRocketEntity
,FishingHook
,FluidBucketWrapper
,FluidHandlerItemStack
,FluidHandlerItemStack.Consumable
,FluidHandlerItemStack.SwapEmpty
,FluidHandlerItemStackSimple
,FluidHandlerItemStackSimple.Consumable
,FluidHandlerItemStackSimple.SwapEmpty
,FlyingMob
,Fox
,FullPotsAccessorDemo.DioriteFlowerPotBlockEntity
,FurnaceBlockEntity
,GameTestTest.EnergyBlockEntity
,Ghast
,Giant
,GlowItemFrame
,GlowSquid
,Goat
,Guardian
,HangingEntity
,Hoglin
,HopperBlockEntity
,Horse
,Husk
,Illusioner
,IronGolem
,ItemEntity
,ItemFrame
,ItemStack
,JigsawBlockEntity
,JukeboxBlockEntity
,LargeFireball
,LeashFenceKnotEntity
,LecternBlockEntity
,Level
,LevelChunk
,LightningBolt
,LivingEntity
,Llama
,LlamaSpit
,LocalPlayer
,MagmaCube
,Marker
,Minecart
,MinecartChest
,MinecartCommandBlock
,MinecartFurnace
,MinecartHopper
,MinecartSpawner
,MinecartTNT
,Mob
,Monster
,Mule
,MushroomCow
,Ocelot
,Painting
,Panda
,Parrot
,PartEntity
,PartEntityTest.TestEntity
,PartEntityTest.TestEntityPart
,PathfinderMob
,PatrollingMonster
,Phantom
,Pig
,Piglin
,PiglinBrute
,Pillager
,PistonMovingBlockEntity
,Player
,PolarBear
,PrimedTnt
,Projectile
,Pufferfish
,Rabbit
,Raider
,RandomizableContainerBlockEntity
,Ravager
,RemotePlayer
,Salmon
,SculkSensorBlockEntity
,ServerLevel
,ServerPlayer
,Sheep
,ShoulderRidingEntity
,Shulker
,ShulkerBoxBlockEntity
,ShulkerBullet
,SignBlockEntity
,Silverfish
,Skeleton
,SkeletonHorse
,SkullBlockEntity
,Slime
,SmallFireball
,SmokerBlockEntity
,Snowball
,SnowGolem
,SpawnerBlockEntity
,SpectralArrow
,SpellcasterIllager
,Spider
,Squid
,Stray
,Strider
,StructureBlockEntity
,TamableAnimal
,TheEndGatewayBlockEntity
,TheEndPortalBlockEntity
,ThrowableItemProjectile
,ThrowableProjectile
,ThrownEgg
,ThrownEnderpearl
,ThrownExperienceBottle
,ThrownPotion
,ThrownTrident
,TileFluidHandler
,TraderLlama
,TrappedChestBlockEntity
,TropicalFish
,Turtle
,Vex
,Villager
,Vindicator
,WanderingTrader
,WaterAnimal
,Witch
,WitherBoss
,WitherSkeleton
,WitherSkull
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
,ZombifiedPiglin
public interface ICapabilityProvider
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> LazyOptional<T>
getCapability
(Capability<T> cap) <T> LazyOptional<T>
getCapability
(Capability<T> cap, Direction side) Retrieves the Optional handler for the capability requested on the specific side.
-
Method Details
-
getCapability
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.- Parameters:
cap
- The capability to checkside
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- Returns:
- The requested an optional holding the requested capability.
-
getCapability
-