public final class SerialAPI
extends java.lang.Object
SerialInterfaceProviders and other
module related tasks.
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.
This is made available in the init phase, so you'll either have to (soft) depend on TIS-3D or you must not make calls to this before the init phase.
| Modifier and Type | Method and Description |
|---|---|
static void |
addProvider(SerialInterfaceProvider provider)
Register the specified provider.
|
static SerialInterfaceProvider |
getProviderFor(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.math.Direction side)
Find the first provider supporting the specified block position.
|
public static void addProvider(SerialInterfaceProvider provider)
provider - the provider to register.@Nullable public static SerialInterfaceProvider getProviderFor(net.minecraft.world.World world, net.minecraft.util.math.BlockPos position, net.minecraft.util.math.Direction 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.