|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITurtleUpgrade
The primary interface for defining an upgrade for Turtles. A turtle upgrade can either be a new tool, or a new peripheral.
TurtleAPI.registerUpgrade( ITurtleUpgrade )
Method Summary | |
---|---|
IHostedPeripheral |
createPeripheral(ITurtleAccess turtle,
TurtleSide side)
Will only be called for Peripheral upgrades. |
java.lang.String |
getAdjective()
Return a String to describe this type of upgrade in turtle item names. |
net.minecraft.item.ItemStack |
getCraftingItem()
Return an item stack representing the type of item that a turtle must be crafted with to create a turtle which holds this upgrade. |
Icon |
getIcon(ITurtleAccess turtle,
TurtleSide side)
Called to obtain the Icon to be used when rendering a turtle peripheral. |
TurtleUpgradeType |
getType()
Return whether this upgrade adds a tool or a peripheral to the turtle. |
int |
getUpgradeID()
Gets a unique numerical identifier representing this type of turtle upgrade. |
boolean |
isSecret()
Return whether this turtle upgrade is an easter egg, and should be attempted to be hidden from the creative mode inventory and recipe book plugins. |
boolean |
useTool(ITurtleAccess turtle,
TurtleSide side,
TurtleVerb verb,
int direction)
Will only be called for Tool upgrades. |
Method Detail |
---|
int getUpgradeID()
TurtleAPI.registerUpgrade( ITurtleUpgrade )
java.lang.String getAdjective()
TurtleUpgradeType getType()
for the differences between the two.
net.minecraft.item.ItemStack getCraftingItem()
boolean isSecret()
IHostedPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side)
turtle
- Access to the turtle that the peripheral is being created for.side
- Which side of the turtle (left or right) that the upgrade resides on.boolean useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction)
turtle
- Access to the turtle that the tool resides on.side
- Which side of the turtle (left or right) the tool resides on.verb
- Which action (dig or attack) the turtle is being called on to perform.direction
- Which world direction the action should be performed in, relative to the turtles
position. This will either be up, down, or the direction the turtle is facing, depending on
whether dig, digUp or digDown was called.
Icon getIcon(ITurtleAccess turtle, TurtleSide side)
turtle
- Access to the turtle that the peripheral resides on.side
- Which side of the turtle (left or right) the peripheral resides on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |