Class CapabilityUtils
java.lang.Object
me.desht.pneumaticcraft.common.util.CapabilityUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull net.minecraftforge.common.util.LazyOptional<T>getNeighbourCap(@NotNull net.minecraftforge.common.capabilities.Capability<T> capability, @NotNull net.minecraft.world.level.block.entity.BlockEntity blockEntity, @NotNull net.minecraft.core.Direction direction) Gets capability of a neighbouringBlockEntity.
-
Method Details
-
getNeighbourCap
@NotNull public static <T> @NotNull net.minecraftforge.common.util.LazyOptional<T> getNeighbourCap(@NotNull @NotNull net.minecraftforge.common.capabilities.Capability<T> capability, @NotNull @NotNull net.minecraft.world.level.block.entity.BlockEntity blockEntity, @NotNull @NotNull net.minecraft.core.Direction direction) Gets capability of a neighbouringBlockEntity.- Parameters:
capability- Capability to get.blockEntity- OriginatingBlockEntity.direction- Direction from to a neighbouring block entity to look for a capability.- Returns:
- The capability on the neighbouring
BlockEntity.
-