Interface ItemMirror

All Known Implementing Classes:
IAttributeMirror, IBundleMirror, IComponentMirror, IContainerMirror, IDisplayMirror, IEffectMirror, IEnchantMirror, IMaterialMirror, IPotionMirror, IShulkerMirror, ISkullOwnerMirror

public interface ItemMirror
ItemMirror interface to make item CompoundTag compatible with actual server version.
  • Method Details

    • getMaximumVersion

      @NotNull default @NotNull com.saicone.rtag.util.MC getMaximumVersion()
      Get the maximum compatible version, exclusive.
      Returns:
      a version.
    • getMinimumVersion

      @NotNull default @NotNull com.saicone.rtag.util.MC getMinimumVersion()
      Get the minimum compatible version, inclusive.
      Returns:
      a version.
    • upgrade

      default void upgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to)
      Upgrade current item tag compound from lower version.
      Parameters:
      compound - the tag compound that represents item data.
      id - the item material id.
      from - the initial version of item data.
      to - the version to upgrade item data.
    • upgrade

      default void upgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull Object components, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to)
      Upgrade current item tag compound from lower version.
      Parameters:
      compound - the tag compound that represents item data.
      id - the item material id.
      components - the item components, on older versions this may be the item tag.
      from - the initial version of item data.
      to - the version to upgrade item data.
    • downgrade

      default void downgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to)
      Downgrade current item tag compound from upper version.
      Parameters:
      compound - the tag compound that represents item data.
      id - the item material id.
      from - the initial version of item data.
      to - the version to downgrade item data.
    • downgrade

      default void downgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull Object components, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to)
      Downgrade current item tag compound from upper version.
      Parameters:
      compound - the tag compound that represents item data.
      id - the item material id.
      components - the item components, on older versions this may be the item tag.
      from - the initial version of item data.
      to - the version to downgrade item data.
    • getDeprecationVersion

      @Deprecated(since="1.5.14", forRemoval=true) default float getDeprecationVersion()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the minimum version where compatibility is deprecated.
      Returns:
      A version number.
    • getMinVersion0

      @Deprecated(since="1.5.14", forRemoval=true) default float getMinVersion0()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the minimum version compatibility.
      Returns:
      A version number.
    • upgrade

      @Deprecated(since="1.5.14", forRemoval=true) default void upgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, float from, float to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Upgrade current CompoundTag from lower version.
      Parameters:
      compound - Item CompoundTag.
      id - Item material identifier.
      from - Version specified in compound.
      to - Version to convert.
    • upgrade

      @Deprecated(since="1.5.14", forRemoval=true) default void upgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull Object components, float from, float to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Upgrade current CompoundTag from lower version.
      Parameters:
      compound - Item CompoundTag.
      id - Item material identifier.
      components - Item components.
      from - Version specified in compound.
      to - Version to convert.
    • downgrade

      @Deprecated(since="1.5.14", forRemoval=true) default void downgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, float from, float to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Downgrade current CompoundTag from upper version.
      Parameters:
      compound - Item CompoundTag.
      id - Item material identifier.
      from - Version specified in compound.
      to - Version to convert.
    • downgrade

      @Deprecated(since="1.5.14", forRemoval=true) default void downgrade(@NotNull @NotNull Object compound, @NotNull @NotNull String id, @NotNull @NotNull Object components, float from, float to)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Downgrade current CompoundTag from upper version.
      Parameters:
      compound - Item CompoundTag.
      id - Item material identifier.
      components - Item components.
      from - Version specified in compound.
      to - Version to convert.