Interface ISideConfigurable

All Known Implementing Classes:
AerialInterfaceBlockEntity, ProgrammableControllerBlockEntity

public interface ISideConfigurable
Represents an block entity whose sides can be reconfigured, i.e. connected to different capability handlers, typically controlled by GUI side tabs. ISideConfigurable block entity GUI's will automatically get a side tab for each side configurator they have. Each side configurator handles one capability (items, fluids, energy...)

Any BE which supports side configuration must also be rotatable, since configurable sides are relative to the block's facing direction.

  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.Direction
    Return the (absolute) direction that this BE is facing.
    Get a collection of all the side configurators this BE has
    default boolean
    isValid(SideConfigurator.RelativeFace face, net.minecraftforge.common.capabilities.Capability<?> cap)
    Check if the given handler is OK for the given face
  • Method Details

    • getSideConfigurators

      List<SideConfigurator<?>> getSideConfigurators()
      Get a collection of all the side configurators this BE has
      Returns:
      the BE's side configurators
    • isValid

      default boolean isValid(SideConfigurator.RelativeFace face, @Nullable net.minecraftforge.common.capabilities.Capability<?> cap)
      Check if the given handler is OK for the given face
      Parameters:
      face - relative face of the block
      cap - the capability to check, may be null to indicate no connectivity on this face
      Returns:
      true if this handler is allowed on this side, false otherwise
    • byIndex

      net.minecraft.core.Direction byIndex()
      Return the (absolute) direction that this BE is facing. Required to determine how to map absolute to relative faces of the block.
      Returns:
      the BE facing direction