public final class SerialInterfaceProviderFurnace extends java.lang.Object implements SerialInterfaceProvider
| Constructor and Description |
|---|
SerialInterfaceProviderFurnace() |
| Modifier and Type | Method and Description |
|---|---|
SerialProtocolDocumentationReference |
getDocumentationReference()
A reference to a manual entry describing the protocol used by the
SerialInterface generated by this provider. |
SerialInterface |
interfaceFor(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side)
Creates a new serial interface instance for the specified position.
|
boolean |
isValid(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side,
SerialInterface serialInterface)
Tests whether the specified serial interface is still valid for the specified position.
|
boolean |
worksWith(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side)
Checks whether the provider supports the specified block position.
|
public boolean worksWith(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side)
SerialInterfaceProviderworksWith in interface SerialInterfaceProviderworld - the world containing the position.position - the position in question.side - the side of the position in question.SerialInterface can be provided for the position.public SerialInterface interfaceFor(net.minecraft.world.World world, net.minecraft.util.math.BlockPos position, net.minecraft.util.EnumFacing side)
SerialInterfaceProviderinterfaceFor in interface SerialInterfaceProviderworld - the world containing the position.position - the position in question.side - the side of the position in question.public SerialProtocolDocumentationReference getDocumentationReference()
SerialInterfaceProviderSerialInterface generated by this provider.
It is generally recommended to have one provider per interface / protocol type. In case you decide you'd like to have one multi-interface provider, you'll need to put all your documentation in that one manual entry, or use it as an index.
While it is legal to return null here, it is strongly discouraged to not have a manual entry for a protocol used by a serial interface, since this will make it nearly impossible for the player to figure out how to use the interface.
The links returned from all registered providers will be listed in the serial protocol overview page in the TIS-3D manual as an automatically populated list.
getDocumentationReference in interface SerialInterfaceProviderpublic boolean isValid(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos position,
net.minecraft.util.EnumFacing side,
SerialInterface serialInterface)
SerialInterfaceProviderThis is used by the serial port module to determine whether a new serial interface instance has to be constructed for the specified position, or whether an existing one can be re-used. This avoids resetting the serial interfaces state in case of an adjacent block change.
Generally this this should return false if the interface is not
once provided by this provider, or more generally, if it is the same kind
of serial interface that would be created via SerialInterfaceProvider.interfaceFor(World, BlockPos, EnumFacing),
otherwise this should return true.
isValid in interface SerialInterfaceProviderworld - the world containing the position.position - the position in question.side - the side of the position in question.serialInterface - the interface to validate.