Class RPWindowHandler


  • @Environment(CLIENT)
    public final class RPWindowHandler
    extends Object
    Contains Minecraft window-related code for RandomPatches.
    • Method Detail

      • enable

        public static void enable()
        Enables this class's functionality if it has not already been enabled.
      • onConfigReload

        public static void onConfigReload()
        Called by RPConfig.Window when the RandomPatches configuration is reloaded.
      • getWindowTitle

        public static String getWindowTitle()
        Returns the Minecraft window title according to the relevant RandomPatches configuration options.
        Returns:
        the Minecraft window title according to the relevant RandomPatches configuration options.
      • updateWindowIcon

        public static void updateWindowIcon​(@Nullable InputStream vanillaIcon16,
                                            @Nullable InputStream vanillaIcon32)
        Applies the RandomPatches configuration options relating to the Minecraft window icon.
        Parameters:
        vanillaIcon16 - the 16x16 vanilla icon.
        vanillaIcon32 - the 32x32 vanilla icon.
      • updateWindowIcon

        public static void updateWindowIcon​(@Nullable InputStream vanillaIcon16,
                                            @Nullable InputStream vanillaIcon32,
                                            long window)
        Applies the RandomPatches configuration options relating to the Minecraft window icon.
        Parameters:
        vanillaIcon16 - the 16x16 vanilla icon.
        vanillaIcon32 - the 32x32 vanilla icon.
        window - the window handle.