use of com.lowdragmc.multiblocked.api.kubejs.events.UpdateRendererEvent in project Multiblocked by Low-Drag-MC.
the class PartTileEntity method updateCurrentRenderer.
@Override
public IMultiblockedRenderer updateCurrentRenderer() {
if (definition.workingRenderer != null) {
for (IControllerComponent controller : getControllers()) {
if (controller.isFormed() && controller.getStatus().equals("working")) {
IMultiblockedRenderer renderer = definition.workingRenderer;
if (Multiblocked.isKubeJSLoaded()) {
UpdateRendererEvent event = new UpdateRendererEvent(this, renderer);
event.post(ScriptType.SERVER, UpdateRendererEvent.ID, getSubID());
renderer = event.getRenderer();
}
return renderer;
}
}
}
return super.updateCurrentRenderer();
}
Aggregations