Search in sources :

Example 1 with PartAddedEvent

use of com.lowdragmc.multiblocked.api.kubejs.events.PartAddedEvent in project Multiblocked by Low-Drag-MC.

the class PartTileEntity method addedToController.

public void addedToController(@Nonnull IControllerComponent controller) {
    if (controllerPos.add(controller.self().getBlockPos())) {
        writeCustomData(-1, this::writeControllersToBuffer);
        if (Multiblocked.isKubeJSLoaded() && controller instanceof ControllerTileEntity) {
            new PartAddedEvent((ControllerTileEntity) controller).post(ScriptType.SERVER, PartAddedEvent.ID, getSubID());
        }
        setStatus("idle");
    }
}
Also used : PartAddedEvent(com.lowdragmc.multiblocked.api.kubejs.events.PartAddedEvent) ControllerTileEntity(com.lowdragmc.multiblocked.api.tile.ControllerTileEntity)

Aggregations

PartAddedEvent (com.lowdragmc.multiblocked.api.kubejs.events.PartAddedEvent)1 ControllerTileEntity (com.lowdragmc.multiblocked.api.tile.ControllerTileEntity)1