public final class TileEntityController
extends net.minecraft.tileentity.TileEntity
implements net.minecraft.util.ITickable
Scans for multi-block structures if scheduled by either the controller itself or by a connected casing. Manages a list of casings and updates the modules in the casing (this is the only ticking part of a multi-block).
Controllers have no real state. They are active when powered by a redstone signal, and can be reset by right-clicking them.
| Modifier and Type | Class and Description |
|---|---|
static class |
TileEntityController.ControllerState
Possible states of a controller.
|
| Constructor and Description |
|---|
TileEntityController() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkNeighbors() |
void |
forceStep()
If the controller is running, force at least one step in the next tick,
even if the controller is currently in the paused state.
|
net.minecraft.util.math.BlockPos |
getPipeHostPosition() |
net.minecraft.world.World |
getPipeHostWorld() |
Pipe[] |
getPipes()
Get the list of all pipes managed by this computer part.
|
Pipe |
getReceivingPipe(Face face,
Port port)
Receiving pipe for the specified face and port.
|
Pipe |
getSendingPipe(Face face,
Port port)
Sending pipe for the specified face and port.
|
TileEntityController.ControllerState |
getState()
Get the current state of the controller.
|
net.minecraft.network.play.server.SPacketUpdateTileEntity |
getUpdatePacket() |
net.minecraft.nbt.NBTTagCompound |
getUpdateTag() |
void |
haltAndCatchFire()
Reset the controller, pause for a moment and catch fire.
|
void |
handleUpdateTag(net.minecraft.nbt.NBTTagCompound nbt) |
protected boolean |
hasNeighbor(Face face) |
void |
invalidate() |
void |
onChunkUnload() |
void |
onDataPacket(net.minecraft.network.NetworkManager manager,
net.minecraft.network.play.server.SPacketUpdateTileEntity packet) |
void |
onWriteComplete(Face sendingFace,
Port sendingPort) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
readFromNBTCommon(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
readFromNBTForClient(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
readFromNBTForServer(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
rebuildOverrides() |
void |
scheduleScan()
Schedule a rescan for connected casings.
|
protected void |
setNeighbor(Face face,
li.cil.tis3d.common.tileentity.TileEntityComputer neighbor) |
void |
stepPipes()
Advances the logic of all pipes by calling
PipeImpl.step() on them. |
void |
update() |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbtIn) |
protected void |
writeToNBTCommon(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
writeToNBTForClient(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
writeToNBTForServer(net.minecraft.nbt.NBTTagCompound nbt) |
addInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getCapability, getDisplayName, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, hasCapability, hasFastRenderer, hasWorld, isInvalid, markDirty, mirror, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validatepublic TileEntityController.ControllerState getState()
public void scheduleScan()
If we're currently scanning this does nothing.
public void forceStep()
public void haltAndCatchFire()
public void invalidate()
invalidate in class net.minecraft.tileentity.TileEntitypublic void onChunkUnload()
onChunkUnload in class net.minecraft.tileentity.TileEntityprotected void readFromNBTForServer(net.minecraft.nbt.NBTTagCompound nbt)
protected void writeToNBTForServer(net.minecraft.nbt.NBTTagCompound nbt)
protected void readFromNBTForClient(net.minecraft.nbt.NBTTagCompound nbt)
protected void writeToNBTForClient(net.minecraft.nbt.NBTTagCompound nbt)
public void update()
update in interface net.minecraft.util.ITickablepublic void stepPipes()
PipeImpl.step() on them.
This will advance pipes with both an active read and write operation to transferring mode, if they're not already in transferring mode.
public Pipe[] getPipes()
public Pipe getReceivingPipe(Face face, Port port)
face - the face to get the port for.port - the port for which to get the port.Casing.getReceivingPipe(Face, Port)public Pipe getSendingPipe(Face face, Port port)
face - the face to get the port for.port - the port for which to get the port.Casing.getSendingPipe(Face, Port)public net.minecraft.world.World getPipeHostWorld()
getPipeHostWorld in interface PipeHostpublic net.minecraft.util.math.BlockPos getPipeHostPosition()
getPipeHostPosition in interface PipeHostpublic void onWriteComplete(Face sendingFace, Port sendingPort)
onWriteComplete in interface PipeHostpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readFromNBT in class net.minecraft.tileentity.TileEntitypublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbtIn)
writeToNBT in class net.minecraft.tileentity.TileEntitypublic void onDataPacket(net.minecraft.network.NetworkManager manager,
net.minecraft.network.play.server.SPacketUpdateTileEntity packet)
onDataPacket in class net.minecraft.tileentity.TileEntity@Nullable public net.minecraft.network.play.server.SPacketUpdateTileEntity getUpdatePacket()
getUpdatePacket in class net.minecraft.tileentity.TileEntitypublic void handleUpdateTag(net.minecraft.nbt.NBTTagCompound nbt)
handleUpdateTag in class net.minecraft.tileentity.TileEntitypublic net.minecraft.nbt.NBTTagCompound getUpdateTag()
getUpdateTag in class net.minecraft.tileentity.TileEntitypublic void checkNeighbors()
protected boolean hasNeighbor(Face face)
protected void setNeighbor(Face face, @Nullable li.cil.tis3d.common.tileentity.TileEntityComputer neighbor)
protected void rebuildOverrides()
protected void readFromNBTCommon(net.minecraft.nbt.NBTTagCompound nbt)
protected void writeToNBTCommon(net.minecraft.nbt.NBTTagCompound nbt)