public interface IGridNode
IAppEngApi.createGridNode| Modifier and Type | Method and Description |
|---|---|
void |
beginVisit(IGridVisitor visitor)
lets you walk the grid stating at the current node using a IGridVisitor, generally not needed, please use only if
required.
|
void |
destroy()
By destroying your node, you destroy any connections, and its existence in the grid, use in invalidate, or
onChunkUnload
|
java.util.EnumSet<AEPartLocation> |
getConnectedSides() |
IReadOnlyCollection<IGridConnection> |
getConnections()
lets you iterate a nodes connections
|
IGrid |
getGrid()
get the grid for the node, this can change at a moments notice.
|
IGridBlock |
getGridBlock() |
IGridHost |
getMachine()
get the machine represented by the node.
|
int |
getPlayerID() |
net.minecraft.world.World |
getWorld() |
boolean |
hasFlag(GridFlags flag)
see if this node has a certain flag
|
boolean |
isActive()
Reflects the networks status, returns true only if the network is powered, and the network is not booting, this
also takes into account channels.
|
void |
loadFromNBT(java.lang.String name,
net.minecraft.nbt.NBTTagCompound nodeData)
this should be called for each node you create, if you have a nodeData compound to load from, you can store all
your nods on a single compound using name.
|
boolean |
meetsChannelRequirements() |
void |
saveToNBT(java.lang.String name,
net.minecraft.nbt.NBTTagCompound nodeData)
this should be called for each node you maintain, you can save all your nodes to the same tag with different
names, if you fail to complete the load / save procedure, network state may be lost between game load/saves.
|
void |
setPlayerID(int playerID)
tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the
security system.
|
void |
updateState()
inform the node that your IGridBlock has changed its internal state, and force the node to update.
|
void beginVisit(@Nonnull
IGridVisitor visitor)
visitor - visitorvoid updateState()
@Nonnull IGridHost getMachine()
@Nonnull IGrid getGrid()
void destroy()
@Nonnull net.minecraft.world.World getWorld()
@Nonnull java.util.EnumSet<AEPartLocation> getConnectedSides()
@Nonnull IReadOnlyCollection<IGridConnection> getConnections()
@Nonnull IGridBlock getGridBlock()
boolean isActive()
void loadFromNBT(@Nonnull
java.lang.String name,
@Nonnull
net.minecraft.nbt.NBTTagCompound nodeData)
name - nbt namenodeData - to be loaded datavoid saveToNBT(@Nonnull
java.lang.String name,
@Nonnull
net.minecraft.nbt.NBTTagCompound nodeData)
name - nbt namenodeData - to be saved databoolean meetsChannelRequirements()
boolean hasFlag(@Nonnull
GridFlags flag)
flag - flagsint getPlayerID()
void setPlayerID(int playerID)
playerID - new player id