Class IComponentMirror.Enchantments
java.lang.Object
com.saicone.rtag.item.mirror.IComponentMirror.TooltipDowngrade
com.saicone.rtag.item.mirror.IComponentMirror.Enchantments
- All Implemented Interfaces:
IComponentMirror.TooltipTransformation, IComponentMirror.Transformation
- Enclosing class:
IComponentMirror
Enchantments component transformation.
This transformation allow to convert any regular enchantment format.
This transformation allow to convert any regular enchantment format.
-
Constructor Summary
ConstructorsConstructorDescriptionEnchantments(int ordinal) Construct an Enchantments transformation with specified flag ordinal value -
Method Summary
Modifier and TypeMethodDescriptionvoiddowngrade(@NotNull Object components, @NotNull String id, @NotNull Object component, @NotNull com.saicone.rtag.util.MC from, @NotNull com.saicone.rtag.util.MC to) Downgrade component value from upper version.booleandowngradeComponent(@NotNull Object components, @NotNull String id, @NotNull Map<String, Object> value) Downgrade map value from new component format.voidupgrade(@NotNull Object components, @NotNull String id, @NotNull Object component, @NotNull com.saicone.rtag.util.MC from, @NotNull com.saicone.rtag.util.MC to) Upgrade component value from lower version.booleanUpgrade list value into new component format.Methods inherited from class IComponentMirror.TooltipDowngrade
downgradeTooltipMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IComponentMirror.TooltipTransformation
hideComponents, upgradeTooltipMethods inherited from interface IComponentMirror.Transformation
downgrade, downgradeList, downgradeObject, move, move, setFlag, upgrade, upgradeComponent, upgradeObject
-
Constructor Details
-
Enchantments
public Enchantments(int ordinal) Construct an Enchantments transformation with specified flag ordinal value- Parameters:
ordinal- The flag ordinal value.
-
-
Method Details
-
upgrade
public void upgrade(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull Object component, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to) Description copied from interface:IComponentMirror.TransformationUpgrade component value from lower version.- Parameters:
components- the component map from item.id- component ID inside map.component- the component itself.from- the initial version of item data.to- the version to upgrade item data.
-
upgradeList
public boolean upgradeList(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull List<Object> value) Description copied from interface:IComponentMirror.TransformationUpgrade list value into new component format.- Parameters:
components- The component map from item.id- Component ID inside map.value- Value of component as Java list.- Returns:
- true to continue with conversion or false to delete component.
-
downgrade
public void downgrade(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull Object component, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to) Description copied from interface:IComponentMirror.TransformationDowngrade component value from upper version.- Parameters:
components- the component map from item.id- component ID inside map.component- the component itself.from- the initial version of item data.to- the version to downgrade item data.
-
downgradeComponent
public boolean downgradeComponent(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull Map<String, Object> value) Description copied from interface:IComponentMirror.TransformationDowngrade map value from new component format.- Specified by:
downgradeComponentin interfaceIComponentMirror.Transformation- Overrides:
downgradeComponentin classIComponentMirror.TooltipDowngrade- Parameters:
components- The component map from item.id- Component ID inside map.value- Value of component as Java map.- Returns:
- true to continue with conversion or false to delete component.
-