Conditions (Requirements)

How to use loading requirements.

Requirementslink

Requirements (aka. "loading requirements") allow you to make parts of your layouts visible or invisible based on various conditions like if an element is hovered, the window has a specific size or if you're currently in a world.

They can also be used in action scripts of buttons, sliders, tickers and everything else with an action script input.

Adding Requirements to Elementslink

To add one or more requirements to elements, just right-click the element and click on Loading Requirements.

Layout-wide Requirementslink

You can also change the visibity of whole layouts by right-clicking the editor background and then clicking on Loading Requirements [Layout-Wide].

Action Scriptslink

Requirements can also be used in action scripts.
You can add them in the action script editor screen and use them to execute specific actions only if the condition of the requirement is met.

Requirement Valueslink

Some requirements need you to set some values to work properly. If that's the case, the requirement screen should tell you to set all values first, but if not, just check if the Edit Requirement Value button is clickable when adding the requirement.
Always check the requirement's description if you're not sure what to set as value.
Some value inputs even support TAB auto completion.

FancyMenu 3.9.0 reworks the Manage Requirements window to use a right-click context menu, keyboard navigation, search, undo/redo (CTRL + Z / CTRL + Y) and CTRL + S as the Done shortcut.

Requirements in Detaillink

The following list contains most, if not all, requirements available in FancyMenu. It is possible that the list is sometimes a bit outdated due to updates for the mod.

Is Element Hoveredlink

Checks if a specific element is hovered by the mouse cursor.
Value required: Yes - Element ID of the target element (e.g., some_element_ID). You can get the ID by right-clicking an element in the editor.

Is Element Focusedlink

Checks if a specific element currently has keyboard focus (for example, a text field or focused button).
Value required: Yes - Element ID of the target element (the same ID shown in the editor)

Is Any Element Hoveredlink

Checks if any element in the layout is currently being hovered by the mouse cursor.
Value required: No

Is Any Button Hoveredlink

Checks if any button (vanilla or custom) is currently being hovered by the mouse cursor.
Value required: No

Is Layout Enabledlink

Checks if a specific layout is currently enabled.
Value required: Yes - The name of the layout (e.g., my_cool_main_menu_layout)

Is Scheduler Runninglink

Checks if a scheduler is currently running.
Value required: Yes - Scheduler ID (e.g., my_scheduler)

Is GUI Scalelink

Checks if the current GUI scale matches certain conditions.
Value required: Yes - Can accept numeric values like 1, 2, etc.

Is Button Activelink

Checks if a specific button is active (clickable).
Value required: Yes - Element ID of the target button (e.g., "some_element_ID")

Is Screen Titlelink

Checks if the screen's DISPLAY title matches a specific text or localization key. This will only check for the display name/title of the screen, like "Options" or "Pause". It will NOT check for the menu/screen identifier (like title_screen)!

Value required: Yes - The exact title text or localization key of the screen

Is Key Pressedlink

Checks if a specific keyboard key is currently being pressed.
Value required: Yes - The key code of the target key. Selected via a UI when editing the requirement value.

Is Any Screen Openlink

Checks if any screen/menu is currently open (returns false if no screen is showing).
Value required: No

Is MC Debug Overlay Enabledlink

Checks if the F3 debug overlay is currently visible.
Value required: No

Is Active Cursor Typelink

Checks if FancyMenu's currently active cursor type matches a specific standard cursor type.
Value required: Yes - Cursor type: normal, writing, crosshair, pointing_hand, resize_horizontal, resize_vertical, resize_nwse, resize_nesw, resize_all, or not_allowed

Is Customization Menu Bar Visiblelink

Checks if FancyMenu's customization menu bar is currently visible.
Value required: No

Is Modpack Mode Enabledlink

Checks if FancyMenu's Modpack Mode is enabled.
Value required: No

Mouse Clickedlink

Checks if a specific mouse button is being pressed.
Value required: Yes - left or right to indicate which mouse button to check

Is Fullscreenlink

Checks if the game is currently in fullscreen mode.
Value required: No

Is Window Widthlink

Checks if the game window width matches specific values.
Value required: Yes - Window width in pixels (e.g., "1920"). Multiple values can be provided by separating with commas.

Is Window Heightlink

Checks if the game window height matches specific values.
Value required: Yes - Window height in pixels (e.g., "1080"). Multiple values can be provided by separating with commas.

Is Window Width Bigger Thanlink

Checks if the game window width is bigger than a specific value.
Value required: Yes - Window width in pixels (e.g., "1920")

Is Window Height Bigger Thanlink

Checks if the game window height is bigger than a specific value.
Value required: Yes - Window height in pixels (e.g., "1080")

Is Multiplayerlink

Checks if the player is currently in a multiplayer world.
Value required: No

Is Singleplayerlink

Checks if the player is currently in a singleplayer world.
Value required: No

Is World Loadedlink

Checks if any world is currently loaded.
Value required: No

Is Adventurelink

Checks if the player is currently in adventure game mode.
Value required: No

Is Creativelink

Checks if the player is currently in creative game mode.
Value required: No

Is Spectatorlink

Checks if the player is currently in spectator game mode.
Value required: No

Is Survivallink

Checks if the player is currently in survival game mode.
Value required: No

Is Game Modelink

Checks if the player is in a specific game mode.
Value required: Yes - Game mode name (e.g., "creative", "survival", "adventure", "spectator")

Is Difficultylink

Checks if the current game difficulty matches a specific value.
Value required: Yes - Difficulty name (e.g., "peaceful", "easy", "normal", "hard")

Is Hardcorelink

Checks if the currently loaded world is in hardcore mode.
Value required: No

Is Camera Perspectivelink

Checks if the current camera perspective matches a specific perspective.
Value required: Yes - first_person, third_person_back, or third_person_front

Is Raininglink

Checks if it's currently raining in the player's location.
Value required: No

Is Thunderinglink

Checks if there's currently a thunderstorm in the player's world.
Value required: No

Is Clear Weatherlink

Checks if the weather is currently clear (not raining or thundering).
Value required: No

Is Snowinglink

Checks if it's currently snowing at the player's location.
Value required: No

Is Player Runninglink

Checks if the player is currently sprinting.
Value required: No

Is Player Sneakinglink

Checks if the player is currently sneaking/crouching.
Value required: No

Is Player Using Itemlink

Checks if the player is currently using an item.
Value required: No

Is Player Swimminglink

Checks if the player is currently swimming.
Value required: No

Is Player Jumping or Fallinglink

Checks if the player is currently jumping.
Value required: No

Is Player Under Waterlink

Checks if the player is completely under water.
Value required: No

Is Player In Waterlink

Checks if the player is in water (can be partially submerged).
Value required: No

Is Player In Lavalink

Checks if the player is in lava.
Value required: No

Is Player In Fluidlink

Checks if the player is in any fluid (water, lava, etc.).
Value required: No

Is Player Riding Entity/Vehiclelink

Checks if the player is riding any entity.
Value required: No

Is Player Riding Jumpable Entitylink

Checks if the player is riding an entity that can jump (like a horse).
Value required: No

Is Player Riding Entity With Healthlink

Checks if the player is riding a living entity with health (like animals, not boats).
Value required: No

Is Player In Powder Snowlink

Checks if the player is currently in powder snow.
Value required: No

Was Player In Powder Snowlink

Checks if the player was in powder snow (used for effects that persist after leaving).
Value required: No

Is Player Wearing Pumpkinlink

Checks if the player is wearing a carved pumpkin on their head.
Value required: No

Is Player Flying With Elytralink

Checks if the player is currently flying with an elytra.
Value required: No

Is Player Creative Flyinglink

Checks if the player is flying in creative mode.
Value required: No

Has Player Absorption Heartslink

Checks if the player has any absorption hearts (golden hearts).
Value required: No

Is Player Witheredlink

Checks if the player is affected by the wither effect.
Value required: No

Is Player Fully Frozenlink

Checks if the player is fully frozen (usually from powder snow).
Value required: No

Is Player Poisonedlink

Checks if the player is affected by the poison effect.
Value required: No

Is Player In Biomelink

Checks if the player is in a specific biome.
Value required: Yes - Biome identifier (e.g., minecraft:birch_forest)

Is Player In Dimensionlink

Checks if the player is in a specific dimension.
Value required: Yes - Dimension identifier (e.g., minecraft:overworld, minecraft:the_nether, minecraft:the_end)

Is Player In Structurelink

Checks if the player is currently inside a specific structure. Requires FancyMenu on the server for server worlds.
Value required: Yes - Structure identifier (e.g., minecraft:village)

Is Entity Nearbylink

Checks if a specific entity type is within a certain radius of the player.
Value required: Yes - Format: "radius:entity_id" (e.g., 10:minecraft:pig - checks for pigs within 10 blocks)

Is Effect Activelink

Checks if a specific potion effect is active on the player.
Value required: Yes - Effect identifier (e.g., minecraft:speed, minecraft:strength)

Is Any Effect Activelink

Checks if the player has any potion effect active.
Value required: No

Is Player Left-Handedlink

Checks if the player is set to left-handed mode in the game options.
Value required: No

Is Inventory Slot Filledlink

Checks if a specific inventory slot contains an item.
Value required: Yes - Slot number (0-35 for main inventory, slots 0-8 are hotbar)

Is Item Hovered in Inventorylink

Checks if the cursor is hovering any item in an inventory screen.
Value required: No

Is Cursor Holding Inventory Itemlink

Checks if the cursor is currently holding an inventory item stack.
Value required: No

Is Hotbar Slot Selectedlink

Checks if a specific hotbar slot is currently selected.
Value required: Yes - Hotbar slot number (0-8)

Has Player Permission Levellink

Checks if the player has at least the specified permission/OP level on the current world or server.
Value required: Yes - Permission level number (0-4, where 4 is server operator)

Is Attack Strength Weakenedlink

Checks if the player's attack strength is currently weakened (not fully charged).
Value required: No

Is Real Time Daylink

Checks if the current real-world day of the month matches a specific value.
Value required: Yes - Day number (1-31). Multiple values can be provided by separating with commas.

Is Real Time Hourlink

Checks if the current real-world hour matches a specific value.
Value required: Yes - Hour in 24-hour format (0-23). Multiple values can be provided by separating with commas.

Is Real Time Minutelink

Checks if the current real-world minute matches a specific value.
Value required: Yes - Minute (0-59). Multiple values can be provided by separating with commas.

Is Real Time Monthlink

Checks if the current real-world month matches a specific value.
Value required: Yes - Month number (1-12, where 1 is January). Multiple values can be provided by separating with commas.

Is Real Time Secondlink

Checks if the current real-world second matches a specific value.
Value required: Yes - Second (0-59). Multiple values can be provided by separating with commas.

Is Real Time Week Daylink

Checks if the current real-world day of the week matches a specific value.
Value required: Yes - Day of week as number (1-7, where 1 is Sunday). Multiple values can be provided by separating with commas.

Is Real Time Yearlink

Checks if the current real-world year matches a specific value.
Value required: Yes - Full year (e.g., "2023"). Multiple values can be provided by separating with commas.

File/Folder Existslink

Checks if a specific file or folder exists on the system.
Value required: Yes - Path to the file or folder (absolute or relative to the game directory)

Is OS Linuxlink

Checks if the operating system is Linux.
Value required: No

Is OS macOSlink

Checks if the operating system is macOS.
Value required: No

Is OS Windowslink

Checks if the operating system is Windows.
Value required: No

Is Internet Connection Availablelink

Checks if an active internet connection is available.
Value required: No

Is Game Languagelink

Checks if the current game language matches a specific value.
Value required: Yes - Language code (e.g., en_us for English)

Is Mod Loadedlink

Checks if a specific mod is loaded.
Value required: Yes - Mod ID (e.g., fancymenu, jei). You can also check for Optifine with optifine. Multiple mod IDs can be provided by separating with commas.

Is MCEF Loadedlink

Checks if MCEF (Minecraft Chromium Embedded Framework) is installed and initialized.
Value required: No

Is Numberlink

Provides advanced number comparison with different comparison modes.
Value required: Yes - Complex format: ["mode":"comparison_mode","number":"value1","compare_with":"value2"]$ where comparison_mode can be equals, bigger-than, smaller-than, bigger-than-or-equals, or smaller-than-or-equals

Is Textlink

Provides advanced text comparison with different comparison modes.
Value required: Yes - Complex format: ["mode":"comparison_mode","text":"text1","compare_with":"text2"]$ where comparison_mode can be equals, contains, starts-with, or ends-with

Is Server IPlink

Checks if the current server IP matches a specific value.
Value required: Yes - Server IP address (with or without port)

Is Server Onlinelink

Checks if a specific server is online and reachable.
Value required: Yes - Server IP address (with or without port)

Is Resource Pack Enabledlink

Checks if a specific resource pack is currently selected/active.
Value required: Yes - Resource pack title or pack ID (e.g., Programmer Art or the pack's ID)

Is Variable Value (FM Variable)link

Checks if a FancyMenu variable has a specific value.
Value required: Yes - Format: "variable_name:expected_value"

Only Once Per Sessionlink

Returns true only once per game session. Useful for one-time announcements or actions.
Value required: No