Interface ITubeNetworkConnector

All Known Implementing Classes:
PressureTubeBlock

public interface ITubeNetworkConnector
Blocks can implement this interface to indicate that they can connect networked pressure tube modules, such as Redstone Modules and Logistics Modules. By default, only Pressure Tube blocks implement this.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canConnectToNetwork(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.world.level.block.state.BlockState state)
    Called when a network is being scanned.
  • Method Details

    • canConnectToNetwork

      boolean canConnectToNetwork(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.world.level.block.state.BlockState state)
      Called when a network is being scanned. Check if the block at the given position can connect to a tube module network in the given direction. This may be as simple as just checking a blockstate property; the blockstate at the position is passed for convenience. If that is not sufficient, the level and position are available in case of the need for a block entity query.
      Parameters:
      level - the world
      pos - block position in question
      dir - the direction to be connected to
      state - the blockstate at the given position
      Returns:
      true if this block should form part of the module network, false otherwise