public interface ITurtleUpgrade
Modifier and Type | Method and Description |
---|---|
IPeripheral |
createPeripheral(ITurtleAccess turtle,
TurtleSide side)
Will only be called for peripheral upgrades.
|
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.
|
int |
getLegacyUpgradeID()
Gets a numerical identifier representing this type of turtle upgrade,
for backwards compatibility with pre-1.76 worlds.
|
|
getModel(ITurtleAccess turtle,
TurtleSide side)
Called to obtain the model to be used when rendering a turtle peripheral.
|
TurtleUpgradeType |
getType()
Return whether this turtle adds a tool or a peripheral to the turtle.
|
java.lang.String |
getUnlocalisedAdjective()
Return a String to describe this type of turtle in turtle item names.
|
ResourceLocation |
getUpgradeID()
Gets a unique identifier representing this type of turtle upgrade.
|
void |
update(ITurtleAccess turtle,
TurtleSide side)
Called once per tick for each turtle which has the upgrade equipped.
|
TurtleCommandResult |
useTool(ITurtleAccess turtle,
TurtleSide side,
TurtleVerb verb,
EnumFacing direction)
Will only be called for Tool turtle.
|
ResourceLocation getUpgradeID()
int getLegacyUpgradeID()
java.lang.String getUnlocalisedAdjective()
TurtleUpgradeType getType()
for the differences between the two.
ItemStack getCraftingItem()
IPeripheral 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.TurtleCommandResult useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, EnumFacing 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.getModel(ITurtleAccess turtle, TurtleSide side)
turtle
- Access to the turtle that the upgrade resides on. This will be null when getting item models!side
- Which side of the turtle (left or right) the upgrade resides on.void update(ITurtleAccess turtle, TurtleSide side)
turtle
- Access to the turtle that the upgrade resides on.side
- Which side of the turtle (left or right) the upgrade resides on.