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.
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.CompoundNBT |
getData()
Returns some data describing the state of the mountable.
|
boolean |
onActivate(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand,
net.minecraft.item.ItemStack heldItem,
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
loadData, saveData
getCurrentState
net.minecraft.nbt.CompoundNBT 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.PlayerEntity player, net.minecraft.util.Hand hand, net.minecraft.item.ItemStack heldItem, float hitX, float hitY)
player
- the player activating the mountable.hand
- the hand the player used.heldItem
- the item held in that hand.hitX
- the relative x coordinate of the activation on the mountable.hitY
- the relative y coordinate of the activation on the mountable.