ModuleRendering.java add boolean isEnabled attribute, isEnabled() and toggleEnabled() methods
protected Name providingModule;
protected RenderGraph renderGraph;
protected WorldRenderer worldRenderer;
+ protected Boolean isEnabled = true;
// Lower number, higher priority. 1 goes first
@Range(min = 1, max = 100)
public ModuleRendering(Context context) {
this.context = context;
- // context.put(ModuleRendering.class, this);
moduleManager = context.get(ModuleManager.class);
providingModule = moduleManager.getEnvironment().getModuleProviding(this.getClass());
}
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
public void setContext(Context newContext) {
this.context = newContext;
}
@@ -73,6 +77,10 @@ public void setInitializationPriority(int initPriority) {
initializationPriority = initPriority;
}
+ public void toggleEnabled() {
+ isEnabled = !isEnabled;
+ }
+
public void initialise() {
renderGraph = context.get(RenderGraph.class);
worldRenderer = context.get(WorldRenderer.class);
