Class IComponentMirror.FireworkExplosion
java.lang.Object
com.saicone.rtag.item.mirror.IComponentMirror.FireworkExplosion
- All Implemented Interfaces:
IComponentMirror.Transformation
- Direct Known Subclasses:
IComponentMirror.Fireworks
- Enclosing class:
IComponentMirror
public static class IComponentMirror.FireworkExplosion
extends Object
implements IComponentMirror.Transformation
FireworkExplosion component transformation.
This transformation save the new explosion shape if it's not compatible with older server version, and bring back when it's converted into newer version.
This transformation save the new explosion shape if it's not compatible with older server version, and bring back when it's converted into newer version.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandowngradeComponent(@NotNull Object components, @NotNull String id, @NotNull Map<String, Object> value) Downgrade map value from new component format.downgradeExplosion(Map<String, Object> explosion, boolean continueOnFail, boolean move) Downgrade provided explosion data.booleanUpgrade map value into new component format.voidupgradeExplosion(Map<String, Object> explosion, boolean move) Upgrade provided explosion data.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IComponentMirror.Transformation
downgrade, downgrade, downgradeList, downgradeObject, move, move, setFlag, upgrade, upgrade, upgradeList, upgradeObject
-
Constructor Details
-
FireworkExplosion
public FireworkExplosion()
-
-
Method Details
-
upgradeComponent
public boolean upgradeComponent(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull Map<String, Object> value) Description copied from interface:IComponentMirror.TransformationUpgrade map value into new component format.- Specified by:
upgradeComponentin interfaceIComponentMirror.Transformation- 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.
-
upgradeExplosion
-
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- 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.
-
downgradeExplosion
public Object downgradeExplosion(Map<String, Object> explosion, boolean continueOnFail, boolean move) Downgrade provided explosion data.- Parameters:
explosion- The explosion map to downgrade.continueOnFail- Continue transformation on fail.move- true to move explosion keys to newer format.- Returns:
- The explosion shape name, or null if conversion fail.
-