Glints

(OptiFine Exclusive)

Get the most from Optifine's custom Enchantment Glints feature (That worked last on mc 1.14)

/goop optifine glintDefine <glint name> <enchantment> <enchantment level> [lore line]

Defines a glint to be used with this plugin's feature.


/goop optifine glintEnchant <glint name> <player> <slot>

Enchants a player's item with the custom glint.

Custom Glints as they looked back in Minecraft 1.14, when OptiFine still had them.

Args Breakdown (What everything does)

<Glint Name>

The internal name you want to give to the glint. Players dont get to see this.


When enchanting / applying custom glints

<Player>

The players whose inventory items will be enchanted. Supports a few vanilla selectors.

<Slot>

The slot in the player's inventory that will be checked. To read on slots see Inventory Slots.

Examples: mainhand, offhand, chest, feet, any, 0-8, ec*


When defining new custom glints

<Enchantment>

The name of the vanilla enchantment that will be linked to the glint.

OptiFine is very peculiar about the behaviour of custom glints, you can only link one custom glint to each enchantment.


<Enchantment Level>

The level of enchantment you specified in the .properties file.

Another peculiarity is that the glint will be applied to an item, if this item has the enchantment specified in the file, and any enchantment at the level specified in the file.

Supports the none keyword, in such case it will only apply the enchantment.


[Lore Line]

The lore line that may be added along the enchantments.

I recommend linking the enchantments also to a lore line, because this way is most secure that players wont be able to get them.

Tips

  • Use complicated (and beautiful) lore lines to make the item seem most magical.

    • Make sure to always start with &7 to guarantee that MMOItems updater wont delete these from your items (as it supports custom enchantment plugins that add their enchantments as lore starting with this color code).


  • This command is the most EULA-compliant way of selling custom glints for irl money, for it, though applying enchantments to items, heavily attempts to apply enchantments that the item cannot even use (Luck of the Sea to Axes, etc).


  • This command is the product of countless hours of experimenting with how OptiFine glints work (basically what breaks them). This is, in short, what it accounts for:

    1. Only one .properties file works per enchantment.

      • That means that if you try to link two different textures to Infinity, only one will load.

    2. If an enchantment and level are specified, say its linked to Lure 5, it is sufficient for the item to have Lure and an enchantment level 5 separately for the glint to be applied

      • Ex. a player applies Lure 2 and Protection 5, getting the enchantment illegaly.

    3. Allow the use of meta-altering enchantments like Sharpness (important because of point #1) by smartly adding the enchantment-level combination that provides the least advantage.

      • Basically, if you link an enchantment to Sharpness 8 and a lore line:

        • If the sword already has Sharpness 8, it will only add the lore line

        • If the sword has Sharpness, and no enchantnment level 8, it will add the lore line and an useless enchantment the sword doesnt already have (say, Inifnity 8) to match the glint requirements.

          • Surely enough, if its a bow, it will not choose Infinity (unless the bow already has Infinity 1, since upgrading to Infinity 8 makes no difference).

        • If the sword doesnt have Sharpness, it will add Sharpness I, the lore line, and an useless enchantment at level 8.

    4. Ensures that the lore line is registered into the MMOItem Lore Stat Data, so that it is not removed by the updateitem command.

How to setup a Glint - The GooP way

A glint applied via this GooP command

1: The .properties file

  1. Simply enough, specify that it is an enchantment, and the texture is called (for this example) vegerex

  2. Link it flexibly to a lore line, say Glint Vegerex with * wildcard all over the place ( for color codes :) )

  3. Modify the rest of the values however you like

type=enchantment

texture=vegerex

enchantmentIDs=efficiency

nbt.display.Lore.*=ipattern:*Glint*V*e*g*e*r*e*x*

speed=1

layer=1

2: The image

For some strange reason, the glints when rendered on armor scroll at an angle 90° to what they scroll when in the inventory. Thus I'd recommend adding some perpendicular details to the texture.

vegerex.png It looks better in its normal 32x32 size

3: The Opti-Fine glint yml configuration

Found in plugins/Gunging_Ootilities_Plugin/opti-fine-glints.yml:

  1. Specify the name of your enchantment

  2. Link it to a cool lore line (so that not everything with efficiency displays it)


  • You may alternatively run the command goop optifine glintDefine Vegerex efficiency none &e< Glint: &6V&ae&eg&3e&6r&ee&ax &e>

Vegerex:

Enchantment: efficiency

LoreLine: '&e< Glint: &6V&ae&eg&3e&6r&ee&ax &e>'

#Level: 5 # Commented because this is level-independent.

Comment from the Dev:

Its so sad that OptiFine hasnt shown any progress on custom glints in 1.15+; They looked so damn cool