Class IBundleMirror
java.lang.Object
com.saicone.rtag.item.mirror.IBundleMirror
- All Implemented Interfaces:
ItemMirror
IBundleMirror class to convert items inside
bundles across versions.
-
Constructor Summary
ConstructorsConstructorDescriptionIBundleMirror(@NotNull ItemTagStream stream) Constructs an IBundleMirror with specifiedItemTagStreamto convert loaded items.IBundleMirror(@NotNull ItemTagStream stream, boolean component) Constructs an IBundleMirror with specifiedItemTagStreamto convert loaded items. -
Method Summary
Modifier and TypeMethodDescriptionvoiddowngrade(@NotNull Object compound, @NotNull String id, @NotNull Object components, @NotNull com.saicone.rtag.util.MC from, @NotNull com.saicone.rtag.util.MC to) Downgrade current item tag compound from upper version.@NotNull com.saicone.rtag.util.MCGet the minimum compatible version, inclusive.voidprocessContent(@NotNull Object tag, @NotNull com.saicone.rtag.util.MC from, @NotNull com.saicone.rtag.util.MC to) Process current bundle content.voidprocessTag(Object tag, float from, float to) Deprecated, for removal: This API element is subject to removal in a future version.voidupgrade(@NotNull Object compound, @NotNull String id, @NotNull Object components, @NotNull com.saicone.rtag.util.MC from, @NotNull com.saicone.rtag.util.MC to) Upgrade current item tag compound from lower version.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ItemMirror
downgrade, downgrade, downgrade, getDeprecationVersion, getMaximumVersion, getMinVersion0, upgrade, upgrade, upgrade
-
Constructor Details
-
IBundleMirror
Constructs an IBundleMirror with specifiedItemTagStreamto convert loaded items.- Parameters:
stream- ItemTagStream instance.
-
IBundleMirror
Constructs an IBundleMirror with specifiedItemTagStreamto convert loaded items.- Parameters:
stream- ItemTagStream instance.component- True if bundle contents component should be used.
-
-
Method Details
-
getMinimumVersion
Description copied from interface:ItemMirrorGet the minimum compatible version, inclusive.- Specified by:
getMinimumVersionin interfaceItemMirror- Returns:
- a version.
-
upgrade
public 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) Description copied from interface:ItemMirrorUpgrade current item tag compound from lower version.- Specified by:
upgradein interfaceItemMirror- 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
public 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) Description copied from interface:ItemMirrorDowngrade current item tag compound from upper version.- Specified by:
downgradein interfaceItemMirror- 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.
-
processContent
@Internal public void processContent(@NotNull @NotNull Object tag, @NotNull @NotNull com.saicone.rtag.util.MC from, @NotNull @NotNull com.saicone.rtag.util.MC to) Process current bundle content.- Parameters:
tag- the item components or tag as tag compound object.from- the initial version of item.to- the version to convert its contents.
-
processTag
@Deprecated(since="1.5.14", forRemoval=true) public void processTag(Object tag, float from, float to) Deprecated, for removal: This API element is subject to removal in a future version.Process current bundle tag to convert items inside.- Parameters:
tag- ItemStack tag.from- Version specified in compound.to- Version to convert.
-