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.
  • 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.Transformation
      Upgrade map value into new component format.
      Specified by:
      upgradeComponent in interface IComponentMirror.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

      public void upgradeExplosion(Map<String,Object> explosion, boolean move)
      Upgrade provided explosion data.
      Parameters:
      explosion - The explosion map to upgrade.
      move - true to move explosion keys to newer format.
    • downgradeComponent

      public boolean downgradeComponent(@NotNull @NotNull Object components, @NotNull @NotNull String id, @NotNull @NotNull Map<String,Object> value)
      Description copied from interface: IComponentMirror.Transformation
      Downgrade map value from new component format.
      Specified by:
      downgradeComponent in interface IComponentMirror.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.