YATS/Forge Documentation
|
Public Member Functions | |
ItemCapsule () | |
ItemCapsule (ItemStack stack, Colours tag, ForgeDirection heading) | |
Object | GetContents () |
Colours | GetColour () |
void | SetColour (Colours colour) |
ForgeDirection | GetHeading () |
void | SetHeading (ForgeDirection heading) |
ICapsuleRenderer | GetRenderer () |
float | getProgress () |
void | addProgress (float progress) |
void | resetProgress () |
NBTTagCompound | getNBT () |
void | loadFromNBT (NBTTagCompound nbt) |
The ItemCapsule implements the ICapsule API in a way that optimizes the transportation of items.
YATS.capsule.ItemCapsule.ItemCapsule | ( | ) |
YATS.capsule.ItemCapsule.ItemCapsule | ( | ItemStack | stack, |
Colours | tag, | ||
ForgeDirection | heading | ||
) |
Constructor for an ItemCapsule to carry items in a capsule. We do what we can to make this easy.
stack | An ItemStack listing all items to be contained in the new capsule. |
tag | A Colour to be associated with the capsule. See ICapsule for explanation. |
heading | The ForgeDirection in which the capsule is to travel initially. |
void YATS.capsule.ItemCapsule.addProgress | ( | float | progress) |
Override of ICapsule's addProgress(); increases the capsule's progress through a tube segment.
progress | A float expressing how much the capsule progresses in a tick. |
Implements YATS.api.ICapsule.
Colours YATS.capsule.ItemCapsule.GetColour | ( | ) |
Override of ICapsule's GetColour(), the get accessor for the capsule's colour.
Implements YATS.api.ICapsule.
Object YATS.capsule.ItemCapsule.GetContents | ( | ) |
Override of ICapsule's GetContents(), the get accessor for the capsule's contents.
Implements YATS.api.ICapsule.
ForgeDirection YATS.capsule.ItemCapsule.GetHeading | ( | ) |
Override of ICapsule's GetHeading(), the get accessor for the capsule's heading.
Implements YATS.api.ICapsule.
NBTTagCompound YATS.capsule.ItemCapsule.getNBT | ( | ) |
Implementation of ICapsule's getNBT(); sets several values for NBT, including the capsule's heading, colour, progress, and whether the capsule has contents. If it does contain things, the contents are also written.
Implements YATS.api.ICapsule.
float YATS.capsule.ItemCapsule.getProgress | ( | ) |
Override of ICapsule's getProgress(), the get accessor for the capsule's progress through its current segment.
Implements YATS.api.ICapsule.
ICapsuleRenderer YATS.capsule.ItemCapsule.GetRenderer | ( | ) |
Override of ICapsule's GetRenderer(); provides for the correct rendering of item capsules.
Implements YATS.api.ICapsule.
void YATS.capsule.ItemCapsule.loadFromNBT | ( | NBTTagCompound | nbt) |
Implementation of ICapsule's loadFromNBT(). Loads a capsule from NBT, reads contents (if any) and stores them; and sets the heading, colour, and progress of the NBT-stored capsule.
nbt | An NBTTagCompound to be read from NBT, typically a "capsule" compound. |
Implements YATS.api.ICapsule.
void YATS.capsule.ItemCapsule.resetProgress | ( | ) |
Override of ICapsule's resetProgress(); returns the capsule's progress through a tube segment to 0 (generally because the capsule has passed into a new tube segment).
Implements YATS.api.ICapsule.
void YATS.capsule.ItemCapsule.SetColour | ( | Colours | colour) |
Override of ICapsule's SetColour(), the set accessor for the capsule's colour.
colour | The Colour to associate with the capsule. |
Implements YATS.api.ICapsule.
void YATS.capsule.ItemCapsule.SetHeading | ( | ForgeDirection | heading) |
Override of ICapsule's SetHeading(), the set accessor for the capsule's heading.
heading | The ForgeDirection the capsule is heading. |
Implements YATS.api.ICapsule.