Interface IBlockAndCoordinatePollSensor

All Superinterfaces:
IBaseSensor
All Known Implementing Classes:
BlockComparatorSensor, BlockHeatSensor, BlockLightLevelSensor, BlockPresenceSensor, BlockRedstoneSensor

public interface IBlockAndCoordinatePollSensor extends IBaseSensor
  • Method Details

    • getRedstoneValue

      int getRedstoneValue(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, int sensorRange, String textBoxText, Set<net.minecraft.core.BlockPos> positions)
      Similar to IPollSensorSetting.getRedstoneValue(Level, BlockPos, int, String), but this has the GPS tracked coordinates as extra parameters. This method will only invoke with a valid GPS tool, and when all the coordinates are within range.
      Parameters:
      world - the sensor's world
      pos - the sensor's position
      sensorRange - the sensor's current range, based on installed range upgrades
      textBoxText - text in the sensor GUI's textbox (may be an empty string)
      positions - When only one GPS Tool is inserted this contains the position of just that tool. If two GPS Tools are inserted, These are both corners of a box, and every coordinate in this box is added to the positions argument.
      Returns:
      the redstone signal level to be emitted
    • getPollFrequency

      int getPollFrequency()
      Returns:
      a poll frequency, in ticks