Class EnchantmentCodecMixin
java.lang.Object
johnsmith.enchantmentcore.mixin.enchantment.EnchantmentCodecMixin
Mixin targeting the static initialization of the Enchantment class.
Purpose: This mixin intercepts and replaces the static DIRECT_CODEC of the Enchantment class.
The replacement codec acts as a "man-in-the-middle" to enable dynamic, JSON-driven configuration and
perform pre-instantiation tree transformations like auto-wiring LBV pointers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<net.minecraft.world.item.enchantment.Enchantment> Shadow reference to the vanilla Enchantment codec. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DIRECT_CODEC
public static com.mojang.serialization.Codec<net.minecraft.world.item.enchantment.Enchantment> DIRECT_CODECShadow reference to the vanilla Enchantment codec. Marked as Mutable to allow reassignment during the static initialization phase.
-
-
Constructor Details
-
EnchantmentCodecMixin
public EnchantmentCodecMixin()
-