public final class RandomModule extends AbstractModule
| Constructor and Description |
|---|
RandomModule(Casing casing,
Face face) |
| Modifier and Type | Method and Description |
|---|---|
void |
onWriteComplete(Port port)
Called from a pipe this module is writing to when the data was read.
|
void |
render(net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher rendererDispatcher,
float partialTicks)
Called to allow the module to render dynamic content on the casing it
is installed in.
|
void |
step()
Advance the state of the module.
|
cancelRead, cancelWrite, getCasing, getFace, getObserverLookAt, hitToUV, isObserverLookingAt, isVisible, onActivate, onBeforeWriteComplete, onData, onData, onDisabled, onDisposed, onEnabled, onInstalled, onUninstalled, readFromNBT, writeToNBTpublic void step()
ModuleThis is called by the controller of the system the module is part of each tick the system is running.
step in interface Modulestep in class AbstractModulepublic void onWriteComplete(Port port)
ModuleThis allows completing the operation in the same tick in which the read operation was completed. This is particularly useful when writing to multiple ports at a time but the written value may only be read once; in this case the remaining writes can be canceled in this callback.
onWriteComplete in interface ModuleonWriteComplete in class AbstractModuleport - the port on which the write operation was completed.@Environment(value=CLIENT)
public void render(net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher rendererDispatcher,
float partialTicks)
ModuleThe render state will be adjusted to take into account the face the module is installed in, i.e. rendering from (0, 0, 0) to (1, 1, 0) will render the full quad of face of the casing the module is installed in.
Note that the enabled is the same as Casing.isEnabled(),
it is merely passed along for backwards compatibility from before the
time that getter existed.
render in interface Modulerender in class AbstractModulerendererDispatcher - the render context of the tile entity the module sits in.partialTicks - the partial time elapsed in this tick.