public interface RackMountable extends ManagedEnvironment, StateAware
ComponentHost
interface and
IInventory
. In this case, if they contain a redstone card and have
a state of State.IsWorking the rack will visually connect to
redstone, for example. Same goes for abstract bus cards, and potentially
more things in the future.
Furthermore, implementing Analyzable
will allow specifying more
information when the analyzer is used on the mountable while it's in a rack.StateAware.State
Modifier and Type | Method and Description |
---|---|
RackBusConnectable |
getConnectableAt(int index)
Returns the node at the specified index.
|
int |
getConnectableCount()
The number of connectables exposed by the environment.
|
net.minecraft.nbt.NBTTagCompound |
getData()
Returns some data describing the state of the mountable.
|
boolean |
onActivate(net.minecraft.entity.player.EntityPlayer player,
float hitX,
float hitY)
This gets called when the server rack is activated by a player, and
hits the space occupied by this mountable.
|
canUpdate, update
node, onConnect, onDisconnect, onMessage
load, save
getCurrentState
net.minecraft.nbt.NBTTagCompound getData()
Rack.markChanged(int)
method has been called for the slot this mountable is in. It will there
be passed on with the render event to allow state specific rendering of
the mountable in the rack.int getConnectableCount()
RackBusConnectable getConnectableAt(int index)
boolean onActivate(net.minecraft.entity.player.EntityPlayer player, float hitX, float hitY)
player
- the player activating the mountable.hitX
- the relative x coordinate of the activation on the mountable.hitY
- the relative y coordinate of the activation on the mountable.