CIT Enchantment
Note that features marked in italics are unique to CIT Resewn.
This page applies to CITs marked with type=enchantment
.
CIT Enchantment replaces the purple glint texture that appears on enchanted items.
These glints can be layered, blended and even be placed on items without vanilla glints.
The glint is a png
texture, formatted like the vanilla glint texture (assets/minecraft/textures/misc/enchanted_item_glint.png
).
Conditions
Target
The CIT must match the item in that has its glint changed.
Effects
Key | Value Type | Description | Default |
---|---|---|---|
texture |
Texture Asset ( .png ) |
Replaces the texture of this glint layer with the resolved texture. | None |
layer |
Any whole number | The position of this glint in the order of layers. If two glints use the same layer, the one with the higher weight will render and the other will not. | 0 |
speed |
Any number | Multiplier for the glint's scroll speed. | 0.0 |
rotation |
Any number | Rotates the texture and scroll direction by the given degrees. | 0.0 |
duration |
Any number | Amount of time in seconds to pause on this cit when the used method is cycle . |
0.0 |
blend |
Literal or Custom | Sets the OpenGL blending function used to apply the texture. | add |
useGlint |
Boolean | Should the default enchantment glint show on the item. | false |
blur |
Boolean | Should the texture be blurred before being applied. | false |
r |
Any positive number | Multiplier for the texture's red component. | 1.0 |
g |
Any positive number | Multiplier for the texture's green component. | 1.0 |
b |
Any positive number | Multiplier for the texture's blue component. | 1.0 |
a |
Any positive number | Multiplier for the texture's alpha component. | 1.0 |
Blending Functions
This section is very computer graphics and opengl heavy.
Named Functions
Function | Function |
---|---|
replace |
Disables blending. |
glint |
GL_SRC_COLOR GL_ONE * Mimics the vanilla glint blending. |
alpha |
GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA |
add |
GL_SRC_ALPHA GL_ONE |
subtract |
GL_ONE_MINUS_DST_COLOR GL_ZERO |
multiply |
GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA |
dodge |
GL_ONE GL_ONE |
burn |
GL_ZERO GL_ONE_MINUS_SRC_COLOR |
screen |
GL_ONE GL_ONE_MINUS_SRC_COLOR |
overlay |
GL_DST_COLOR GL_SRC_COLOR |
Custom Function
Instead of using one of the named functions, you can create your own by specifying the
parameters that are passed onto OpenGL's blendFuncSeparate
method.
This takes either 4 or 2 parameters with the alpha factors defaulting to GL_ZERO, GL_ONE
.
The parameters are separated by spaces and can be specified by using either a decimal constant,
a hexadecimal constant (with a 0x
prefix) or by a named GL11 constant name.
Example:
# Ways of specifying a "multiply" blending function
blend=multiply
blend=GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA
blend=GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA GL_ZERO GL_ONE
blend=774 771
blend=0x306 0x303