YATS/Forge Documentation
|
Public Member Functions | |
boolean | AcceptsItemsOnSide (ForgeDirection side) |
boolean | IsConnectedOnSide (ForgeDirection side) |
boolean | CanAccept (ICapsule capsule) |
Boolean | CanRoute () |
int | GetPressure () |
void | SetPressure (int pressure) |
Colours | GetColour () |
void | SetColour (Colours colour) |
int | GetAdditionalPriority () |
void | AcceptCapsule (ICapsule capsule) |
void | SetConnectionOnSide (ForgeDirection side, boolean connected) |
boolean | IsConnectableOnSide (ForgeDirection side) |
ITubeConnectable provides an API for YATS tiles (tubes, extractors, etc.) that connect to each other, including behavior and state tests for cooperation between tiles and capsule routing.
Tube pressure influences the rate at which capsules progress through tubes. For each tick, the amount of progress added to the capsule equals pressure/100. For instance, a 5-pressure tube will advance 1 block every 20 ticks.
Tube colour influences which capsules a tube will accept. For instance, an orange tube will only accept capsules that are orange, or have no colour. A colourless tube will accept any capsule.
Priority, in YATS, is the method by which tube routing picks routes through the tubes. See TubeRouting.java
void YATS.api.ITubeConnectable.AcceptCapsule | ( | ICapsule | capsule) |
Provides routines to be performed when the tile is offered and can accept a capsule.
capsule | The capsule, implementing ICapsule, to be accepted into the tile's contents. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
boolean YATS.api.ITubeConnectable.AcceptsItemsOnSide | ( | ForgeDirection | side) |
Tests whether the tile accepts incoming capsules on the given side.
side | The side which is to be tested for acceptance of capsules, according to tile behavior |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
boolean YATS.api.ITubeConnectable.CanAccept | ( | ICapsule | capsule) |
Tests whether the tile will accept a capsule (ex. by colour - it's like racism for tubes).
capsule | The capsule to be tested according to the conditions of the tile. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
Boolean YATS.api.ITubeConnectable.CanRoute | ( | ) |
Tests whether the tile can route a capsule.
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
int YATS.api.ITubeConnectable.GetAdditionalPriority | ( | ) |
Adds additional priority to a tube route.
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
Colours YATS.api.ITubeConnectable.GetColour | ( | ) |
This is the get accessor for the tile's colour.
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
int YATS.api.ITubeConnectable.GetPressure | ( | ) |
This is the get accessor for the pressure within the tile.
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
boolean YATS.api.ITubeConnectable.IsConnectableOnSide | ( | ForgeDirection | side) |
Tests whether a given side of the tile can accept connection to another connectable
side | A ForgeDirection side of the tile to test for connectability. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
boolean YATS.api.ITubeConnectable.IsConnectedOnSide | ( | ForgeDirection | side) |
Tests whether the tile is connected to another connectable tile on the given side.
side | The side which is to be tested for connection to another connectable tile. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
void YATS.api.ITubeConnectable.SetColour | ( | Colours | colour) |
This is the set accessor for the tile's colour.
colour | The Colour with which the tile is to be associated. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
void YATS.api.ITubeConnectable.SetConnectionOnSide | ( | ForgeDirection | side, |
boolean | connected | ||
) |
Sets the connection state of a side of the tile.
side | A ForgeDirection side of the tile to be updated. |
connected | A boolean; true if the side is connected, false if disconnected. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.
void YATS.api.ITubeConnectable.SetPressure | ( | int | pressure) |
This is the set accessor for the pressure within the tile.
pressure | An integer value for the tube pressure within the tile. |
Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.