Interface ICapabilityProvider

All Known Subinterfaces:
ICapabilitySerializable<T>, IForgeChunk, IForgeEntity, IForgeItemStack, IForgeTileEntity, IForgeWorld, IForgeWorldServer
All Known Implementing Classes:
AbstractArrowEntity, AbstractChestedHorseEntity, AbstractClientPlayerEntity, AbstractFireballEntity, AbstractFishEntity, AbstractFurnaceTileEntity, AbstractGroupFishEntity, AbstractHorseEntity, AbstractIllagerEntity, AbstractMinecartEntity, AbstractPiglinEntity, AbstractRaiderEntity, AbstractSkeletonEntity, AbstractVillagerEntity, AgeableEntity, AmbientEntity, AnimalEntity, AreaEffectCloudEntity, ArmorStandEntity, ArrowEntity, BannerTileEntity, BarrelTileEntity, BatEntity, BeaconTileEntity, BedTileEntity, BeeEntity, BeehiveTileEntity, BellTileEntity, BlastFurnaceTileEntity, BlazeEntity, BoatEntity, BrewingStandTileEntity, CampfireTileEntity, CapabilityAnimation.DefaultItemAnimationCapabilityProvider, CapabilityDispatcher, CapabilityProvider, CatEntity, CaveSpiderEntity, ChestMinecartEntity, ChestTileEntity, ChickenEntity, Chunk, ClientPlayerEntity, ClientWorld, CodEntity, CommandBlockMinecartEntity, CommandBlockTileEntity, ComparatorTileEntity, ConduitTileEntity, ContainerMinecartEntity, CowEntity, CreatureEntity, CreeperEntity, CustomSignsTest.CustomSignTileEntity, DamagingProjectileEntity, DaylightDetectorTileEntity, DispenserTileEntity, DolphinEntity, DonkeyEntity, DragonFireballEntity, DropperTileEntity, DrownedEntity, EggEntity, ElderGuardianEntity, EmptyChunk, EnchantingTableTileEntity, EnderChestTileEntity, EnderCrystalEntity, EnderDragonEntity, EnderDragonPartEntity, EndermanEntity, EndermiteEntity, EnderPearlEntity, EndGatewayTileEntity, EndPortalTileEntity, Entity, EvokerEntity, EvokerFangsEntity, ExperienceBottleEntity, ExperienceOrbEntity, EyeOfEnderEntity, FakePlayer, FallingBlockEntity, FireballEntity, FireworkRocketEntity, FishingBobberEntity, FluidBucketWrapper, FluidHandlerItemStack, FluidHandlerItemStack.Consumable, FluidHandlerItemStack.SwapEmpty, FluidHandlerItemStackSimple, FluidHandlerItemStackSimple.Consumable, FluidHandlerItemStackSimple.SwapEmpty, FlyingEntity, FoxEntity, FullPotsAccessorDemo.DioriteFlowerPotTileEntity, FurnaceMinecartEntity, FurnaceTileEntity, GhastEntity, GiantEntity, GolemEntity, GuardianEntity, HangingEntity, HoglinEntity, HopperMinecartEntity, HopperTileEntity, HorseEntity, HuskEntity, IllusionerEntity, IronGolemEntity, ItemEntity, ItemFrameEntity, ItemStack, JigsawTileEntity, JukeboxTileEntity, LeashKnotEntity, LecternTileEntity, LightningBoltEntity, LivingEntity, LlamaEntity, LlamaSpitEntity, LockableLootTileEntity, LockableTileEntity, MagmaCubeEntity, MinecartEntity, MobEntity, MobSpawnerTileEntity, MonsterEntity, MooshroomEntity, MuleEntity, OcelotEntity, PaintingEntity, PandaEntity, ParrotEntity, PartEntity, PatrollerEntity, PhantomEntity, PigEntity, PiglinBruteEntity, PiglinEntity, PillagerEntity, PistonTileEntity, PlayerEntity, PolarBearEntity, PotionEntity, ProjectileEntity, ProjectileItemEntity, PufferfishEntity, RabbitEntity, RavagerEntity, RemoteClientPlayerEntity, SalmonEntity, ServerPlayerEntity, ServerWorld, SheepEntity, ShoulderRidingEntity, ShulkerBoxTileEntity, ShulkerBulletEntity, ShulkerEntity, SignTileEntity, SilverfishEntity, SkeletonEntity, SkeletonHorseEntity, SkullTileEntity, SlimeEntity, SmallFireballEntity, SmokerTileEntity, SnowballEntity, SnowGolemEntity, SpawnerMinecartEntity, SpectralArrowEntity, SpellcastingIllagerEntity, SpiderEntity, SquidEntity, StrayEntity, StriderEntity, StructureBlockTileEntity, TameableEntity, ThrowableEntity, TileEntity, TileFluidHandler, TNTEntity, TNTMinecartEntity, TraderLlamaEntity, TrappedChestTileEntity, TridentEntity, TropicalFishEntity, TurtleEntity, VexEntity, VillagerEntity, VindicatorEntity, WanderingTraderEntity, WaterMobEntity, WitchEntity, WitherEntity, WitherSkeletonEntity, WitherSkullEntity, WolfEntity, World, ZoglinEntity, ZombieEntity, ZombieHorseEntity, ZombieVillagerEntity, ZombifiedPiglinEntity

public interface ICapabilityProvider
  • Method Details

    • getCapability

      @Nonnull <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side)
      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:
      capability - The capability to check
      facing - 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

      @Nonnull default <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap)