Skip to content

Interfaces

Meredith Espinosa edited this page Jul 25, 2018 · 2 revisions

Currently, InfraRedstone has five interfaces designed to help create addons and extended features.

IInfraRedstone and ISimpleInfraRedstone

These interfaces are designed for the InfraRedstone Capability. Each returns a value from 0-63 for other modules to read. ISimpleInfraRedstone is designed to be used without a TileEntity, so it must be passed information like the World, BlockPos, IBlockState and EnumFacing it's being accessed from. ISimpleInfraRedstone also includes a Boolean to inform other blocks of whether they can connect to it, since it can be complicated and intensive to add Capabilities to non-TileEntities.

IEncoderScannable and ISimpleEncoderScannable

Previously IInfraComparator and ISimpleInfraComparator. These interfaces are designed to interact with the Encoder currently in development builds of InfraRedstone. They can also be used for other logic systems, like computers or device activation. Each returns a value from 0-63 for a comparator-style module to read. ISimpleEncoderScannable is designed to be used without a TileEntity, so it must be passed information like the World, BlockPos, IBlockState and EnumFacing it's being accessed from.

IMultimeterProbe

This interface is used to serve information to a Multimeter for the use of debugging InfraRedstone projects. It returns a TextComponentString that will be sent to a player as a Message. The probe message should contain the signal output of the device, as well as any other necessary information that may be necessary. When giving information to the player, always format a signal value in the format of 0b11_1111 (63).