Custom GUIs#

Custom GUIs can define a texture for each inventory, and apply them based on different criteria, such as the entity, biome, & height.

Location

assets/minecraft/optifine/gui/container/ANY NAME.properties

For each container GUI texture to override, use this template and create a .properties file in the assets/minecraft/optifine/gui/container folder of the resource pack. Properties files can be organized into subfolders of any depth, as long as everything is within the top-level assets/minecraft/optifine/gui/container folder.

_images/icon8.png

Custom Shulker box GUI#

_images/settings6.png

Button and tooltip for the option, found in Video Settings ➔ Quality#

Different container types have different requirements and restrictions. See below for details for each container type.

General properties#

Key

Values

Meaning

container

Values: anvil, beacon, brewing_stand, chest, crafting, dispenser, enchantment, furnace, hopper, horse, villager, shulker_box, creative, or inventory
Required: ✅ Yes

Type of container GUI to apply to

texture, texture.<path>

Values: String, path to texture
Required: ✅ Yes
Replacement for the GUI texture
The texture property replaces the default GUI texture.
The texture.<path> property can be used to replace any GUI texture
<path> is relative to /assets/minecraft/textures/gui
The creative inventory GUI does not have a default texture so it has to use path textures.

Example for creative inventory:
In assets/minecraft/optifine/gui/container/creative/creative_desert.properties:

container=creative
biomes=desert
texture.container/creative_inventory/tab_inventory=tab_inventory_desert
texture.container/creative_inventory/tabs=tabs_desert
texture.container/creative_inventory/tab_items=tab_items_desert
texture.container/creative_inventory/tab_item_search=tab_item_search_desert

At least one texture or texture.<path> is required.

name

Values: String
Required: ❌ No
Custom entity or block entity name
Apply texture only when the container matches this rule
See Regular expressions for details

biomes

Values: List of biomes
Required: ❌ No
Biomes where this replacement applies
Biomes added by mods can also be used

heights

Values: Integer, or range of integers
Required: ❌ No
Heights where this replacement applies
Since 1.18, negative values may be specified for height. When used in a range they have to be put in parenthesis ( ).

Block-specific properties#

These additional properties do not need any separate files.

Chests#

Note

Implies container=chest

Key

Values

Meaning

large

Values: Boolean
Required: ❌ No

Use replacement on a large chest

trapped

Values: Boolean
Required: ❌ No

Use replacement on a trapped chest

christmas

Values: Boolean
Required: ❌ No

Use replacement on any chest during Christmas

ender

Values: Boolean
Required: ❌ No

Use replacement on an Ender Chest

Beacons#

Note

Implies container=beacon

Key

Values

Meaning

levels

Values: Integer, or range of integers
Required: ❌ No

What levels of beacon power to apply to (how many bases of blocks)

Villagers#

Note

Implies container=villager

Key

Values

Meaning

professions

Values: none, armorer, butcher, cartographer, cleric, farmer, fisherman, fletcher, leatherworker, librarian, mason, nitwit, shepherd, toolsmith, or weaponsmith, along with an optional level experience format
Required: ❌ No
List of villager professions with optional levels
Entry format: <profession>[:level1,level2,...]
Example:
Professions farmer (all levels) or librarian (levels 1,3,4): professions=farmer librarian:1,3-4
Professions fisher, shepard, nitwit: professions=fisherman shepherd nitwit

Horse & dispenser#

Note

Implies container=horse or container=dispenser

Important

This property can apply to two distinct types

Key

Values

Meaning

variants

Values: horse, donkey, mule, llama, or dispenser, dropper
Required: ❌ No

What specific container to apply to

Llama & shulker box#

Note

Implies container=shulker_box or container=horse

Important

This property can apply to two distinct types

colors

Values: String, one of: white, orange, magenta, light_blue, yellow, lime, pink, gray, light_gray, cyan, purple, blue, brown, green, red, black
Required: ❌ No

Shulker box color or llama carpet color


🆚️ This documentation assumes the latest OptiFine version. Notes are not made for legacy versions (1.8).
🔙️ This documentation is updated to commit 8410499f.
©️ This file is offered without any copyright restrictions. Please copy and modify it to suit your needs. Credit is optional, but appreciated.