Class CapabilityUtils

java.lang.Object
me.desht.pneumaticcraft.common.util.CapabilityUtils

public final class CapabilityUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <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 neighbouring BlockEntity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 neighbouring BlockEntity.
      Parameters:
      capability - Capability to get.
      blockEntity - Originating BlockEntity.
      direction - Direction from to a neighbouring block entity to look for a capability.
      Returns:
      The capability on the neighbouring BlockEntity.