YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
YATS.api.ITubeConnectable Interface Reference
Inheritance diagram for YATS.api.ITubeConnectable:
YATS.tile.TileAdvExtractor YATS.tile.TileExtractor YATS.tile.TileRoutingMarshaller YATS.tile.TileTube

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)
 

Detailed Description

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

Member Function Documentation

void YATS.api.ITubeConnectable.AcceptCapsule ( ICapsule  capsule)

Provides routines to be performed when the tile is offered and can accept a capsule.

Parameters
capsuleThe 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.

Parameters
sideThe side which is to be tested for acceptance of capsules, according to tile behavior
Returns
True if the tile accepts items on the given side, otherwise false.

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).

Parameters
capsuleThe capsule to be tested according to the conditions of the tile.
Returns
True if the tile will accept the capsule, otherwise false.

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.

Returns
True if the tile can be utilized for routing a capsule, otherwise false.

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.

Returns
An integer representing the additional priority of the tile.

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.

Returns
The Colour associated with the tile.

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.

Returns
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.

boolean YATS.api.ITubeConnectable.IsConnectableOnSide ( ForgeDirection  side)

Tests whether a given side of the tile can accept connection to another connectable

Parameters
sideA ForgeDirection side of the tile to test for connectability.
Returns
True if the side is connectable, false if unconnectable.

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.

Parameters
sideThe side which is to be tested for connection to another connectable tile.
Returns
True if the tile is connected to another connectable tile on the given side, otherwise false.

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.

Parameters
colourThe 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.

Parameters
sideA ForgeDirection side of the tile to be updated.
connectedA 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.

Parameters
pressureAn integer value for the tube pressure within the tile.

Implemented in YATS.tile.TileExtractor, YATS.tile.TileAdvExtractor, YATS.tile.TileRoutingMarshaller, and YATS.tile.TileTube.


The documentation for this interface was generated from the following file: