Class EnvironmentManager

java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.EnvironmentManager

@Deprecated(since="4.4") public final class EnvironmentManager extends Object
Deprecated.
Replaced with EnvironmentLookup
Controls what instance of the EnvironmentManager is to be used by Thermoo events
  • Field Details

    • INSTANCE

      public static final EnvironmentManager INSTANCE
      Deprecated.
      Singleton instance of this class
  • Method Details

    • getController

      @NotNull public @NotNull EnvironmentController getController()
      Deprecated.
      Gets the currently configured environment controller. Note that the controller is reset on server stop/start. By default, the controller is an instance of EmptyEnvironmentController.
      Returns:
      Returns the current environment controller used by Thermoo.
    • addController

      public void addController(Function<EnvironmentController,EnvironmentController> decorator)
      Deprecated.
      Appends an additional environment controller decorator to the existing environment controller.

      Note that this controller will be removed on server stop, and then reinitialized with EnvironmentControllerInitializeEvent. It is therefore preferred for mods to add their decorators via that event rather than through direct access to this method.

      This method is left public primarily for testing/mocking purposes, and should not be used normally.

      Parameters:
      decorator - The controller decorator constructor
    • peelController

      @NotNull public @NotNull EnvironmentController peelController()
      Deprecated.
      Peels off the top decorator of the controller. If the controller has no child, then this will do nothing.
      Returns:
      Returns the previous decorator
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object