Where to Find the Potions in a Texturepack
Custom Item Textures¶
Custom Item Textures can change items to different textures based on their properties, such as enchantments, name, or NBT rules.
Based on the configuration for MCPatcher's Custom Item Textures mod.
Global properties¶
Location
/assets/minecraft/optifine/cit.properties
This file contains global properties for CIT and should be in the optifine/cit
folder of the resource pack.
For individual item textures, see the "Properties" section.
Note
All property names are case-sensitive
All paths are relative to assets/minecraft/
unless otherwise specified
average
and layered
methods with cap=1
are equivalent and will both show only the "dominant" enchantment on an item
Warning
Not implemented: method
, cap
, fade
Key | Values | Meaning |
---|---|---|
| | Specifies how to apply multiple effects on the same item. Depending on the method chosen, multiple effects can be rendered with different intensities from • • • |
| Positive integer, optional | Specifies how many layers can render for The top-most layers have priority over bottom-most layers as determined by the layer value of each effect. |
| Positive float, optional | The speed at which one effect will transition into another in a cycle. This does not affect the duration of the actual effect when displayed – for that use the effect's Default is |
| Boolean | Use default If true: If false: the default This is important for items that have no specific enchantment, but have an enchantment effect - such as potions and golden apples. Default is |
Properties¶
Location
/assets/minecraft/optifine/cit/ANYNAME.properties
For each item to override with a custom texture, create a .properties
file in the assets/minecraft/optifine/cit/
folder of the resource pack and write it's CIT. Properties files can be organized into subfolders of any depth, as long as everything is within the top-level optifine/cit
folder.
Each properties file specifies:
-
a list of matching item IDs or names
-
a replacement texture
-
an optional set of rules specifying damage, stack size, NBT tags, etc.
Note
All property names are case-sensitive
All paths are relative to assets/minecraft/
unless otherwise specified
For best compability with tag matching, use escape sequences for characters outside the A to z range; \u0107
instead of Ä
Key | Values | Meaning | Default |
---|---|---|---|
| | Type of texture replacement. • • • • | |
| List of items, optional | List of item IDs to apply the replacement texture to | None |
| String, path to texture, optional | Path to replacement texture. Can be a full path or just a name: • • | Name of properties file, |
| String, path to texture, optional | Path to replacement model. Model must be in vanilla format. • • Model may reference textures from the same folder; for example | None |
| Integer from | Damage values, replacement texture is used only when the item damage is a certain value or range. For items with durability, damage starts at 0 for a new item and increases as it gets damaged. The maximum damage an item can take varies For other items, | None |
| Integer bitmask, optional | Bitmask applied to the item's damage before checking it against the list of eligible damage values Examples: • Match any Fire Resistance potion: • Match any non-splash Fire Resistance potion: • Match non-splash Fire Resistance I potion only: • Match splash Fire Resistance II potion only: For a simpler way, see Potions | |
| Integer from | Replacement texture is used only when the item's amount in an inventory slot is a certain value or range | |
| List of strings, optional | List of enchantment names to match. The enchantment names may be short ( For example: If | Any |
| ↑ | Legacy property for | ↑ |
| List of integers from | List of enchantment levels. For example: If | Any |
| | Hand in which the item is placed onto (main hand, offhand). When rendered in the inventory GUI, the item is considered to be in the | |
| Any value, optional | NBT-based rule. Replacement texture is used only when an NBT tag on the item has a specific value. See NBT rules. | None |
Type-specific properties¶
Items¶
Key | Values | Meaning | Default |
---|---|---|---|
| String, path to texture | Item replacement textures are stitched into | None |
| String, path to texture, optional | Replacement for alternate textures. For items with more than one texture, this allows specifying replacements for each texture separately. For example: the vanilla bow has four possible textures depending on its' state: To replace all four, this can be used: Potions also have two textures. To replace them, use: If no | None |
| String, path to texture, optional | Path to a JSON item model in vanilla format. Can be a full path or just a name: • • The model may reference textures from the same folder, for example: | None |
| String, path to texture, optional | Replacement for alternate models. For items with more than one model, this allows specifying replacements for each model separately For example: the vanilla bow has four possible textures depending on its' state: To replace all four, this can be used: | None |
| Positive integer, optional | If multiple properties files match the same item, the highest weighted one is used. In the event of a tie, the properties filenames are compared next | |
Enchantments¶
Note
Implies type=enchantment
Note
duration
only works for cycle
enchantments
Key | Values | Meaning | Default |
---|---|---|---|
| String, path to texture | The enchantment texture can be any resolution. To animate an enchantment, use the | None |
| String, blend method, optional | Blend method when applying texture to the texture below it See Custom Sky for a list of valid methods | |
| Positive integer, optional | Scrolling speed of texture | |
| Positive integer from | Angle of texture (in degrees) relative to the item If | |
| Positive integer, optional | Specifies a unique layer and the ordering of the layers as they overlap each other. If two or more effects use the same layer, | |
| Positive integer, optional | Relative priority of the enchantment within a layer Of the matching effects, only the highest weighted one within a layer is rendered. In other words: The layer property determines the ORDER in which effects are rendered The weight property determines WHICH effect is rendered for each layer If two effects have the same weight and layer, the filename is used as a tiebreaker | |
| Positive integer, optional | Duration in seconds of enchantment in a cycle | |
Armor¶
Key | Values | Meaning | Default |
---|---|---|---|
| String, path to texture, required | Replacement textures. A replacement for each texture is needed in For diamond armor (2 layers total): For leather armor (4 layers total): The texture should match the format of the corresponding armor texture. For animated textures, use the | Generic texture |
| Positive integer, optional | If multiple properties files match the same armor, the highest weighted one is used In the event of a tie, the filenames are compared next | |
Potions¶
Note
While there is no specific potion-related tag, nbt
can be used
Potions with custom effects can be matched using their NBT Potion
string, or with nbt.CustomPotionEffects.*.Id
.
type = item items = potion nbt.Potion = minecraft:strength
type = item items = potion nbt.CustomPotionEffects.*.Id = 20
Stronger versions of potions can be matched by prefixing strong_
to the Potion
NBT tag match.
Longer versions of potions can be matched by prefixing long_
to the Potion
NBT tag match.
Lingering and Splash potions can be matched with the same method by simply changing the items
tag appropriately.
Shortcut¶
Note
Everything described here can be done via CIT properties files; this is a shortcut
Note
No properties files are necessary for this method
As an alternative to listing potion damage values, replacement textures for potions can be specified using a filename based system. See this page for the data-values.
There are three directories for potions:
-
optifine/cit/potion/normal
: drinkable potions -
optifine/cit/potion/splash
: splash potions -
optifine/cit/potion/linger
: lingering potions
Within any of these directories, create a PNG file with the name of the potion effect:
Note
Effect names in italic means they are obtainable in-game
Effects not in italic can only be created via commands
Important
This replaces both potion.png/potion_splash.png
and potion_contents.png
from the standard potion rendering
Warning
Be sure to include the colored liquid in the replacement textures
Effect name | File name |
---|---|
Absorption | |
Blindness | |
Confusion | |
Damage Boost | |
Mining Fatigue | |
Haste | |
Fire Resistance | |
Harming | |
Healing | |
Health Boost | |
Hunger | |
Invisibility | |
Leaping | |
Slowness | |
Speed | |
Night Vision | |
Poison | |
Regeneration | |
Resistance | |
Saturation | |
Water Breathing | |
Weakness | |
Wither | |
The names are the same as the potion. The replacement texture will automatically be used for that potion type; no properties file required. Note that this replaces both.
Similarly, textures can be replaced for the various "no effect" potions. These have drinkable versions only, the rest are in the code and are listed here only for completeness.
Note
Effect names in italic means they are obtainable in-game
Effects not in italic can only be created via commands
Effect name | File name |
---|---|
Artless | |
Awkward | |
Bland | |
Bulky | |
Bungling | |
Buttered | |
Charming | |
Clear | |
Cordial | |
Dashing | |
Debonair | |
Elegant | |
Fancy | |
Flat | |
Foul | |
Gross | |
Harsh | |
Milky | |
Mundane | |
Odorless | |
Potent | |
Rank | |
Sparkling | |
Stinky | |
Suave | |
Thick | |
Thin | |
Uninteresting | |
If a single texture for all "no effect" potions is preferred, optifine/cit/potion/normal/other.png
is used as a fallback for any that do not have a specific replacement as listed above.
Two additional textures (drinkable only) can also be provided:
-
optifine/cit/potion/normal/water.png
: water bottle -
optifine/cit/potion/normal/empty.png
: empty glass bottle
Examples¶
Stacked coins¶
type = item items = iron_nugget stackSize = 61-64 texture = iron_coins_16
Splash potion¶
type = item items = splash_potion model = item/fire_resistance_splash nbt.Potion = minecraft:fire_resistance
{ "parent" : "item/generated" , "textures" : { "layer0" : "item/fire_resistance_overlay" , "layer1" : "item/fire_resistance_splash" } }
đ️ This documentation assumes the latest OptiFine version. Notes may be made for legacy versions (1.8), but there is no guarantee.
©️ This file is offered without any copyright restrictions. Please copy and modify it to suit your needs.
Where to Find the Potions in a Texturepack
Source: https://optifine.readthedocs.io/cit.html
0 Response to "Where to Find the Potions in a Texturepack"
Post a Comment