public interface SerialAPI
SerialInterfaceProviders.
When a serial port module tries to establish a serial connection with the
block in front of it, the registered providers supporting the position will
be used to create the SerialInterface used
to communicate with the block.
| Modifier and Type | Method and Description |
|---|---|
void |
addProvider(SerialInterfaceProvider provider)
Register the specified provider.
|
SerialInterfaceProvider |
getProviderFor(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side)
Find the first provider supporting the specified block position.
|
void addProvider(SerialInterfaceProvider provider)
provider - the provider to register.SerialInterfaceProvider getProviderFor(net.minecraft.world.World world, net.minecraft.util.math.BlockPos position, net.minecraft.util.EnumFacing side)
world - the world the block to get the provider for lives in.position - the position the block to get the provider for lives at.side - the side of the block the provider should work for.