getMap method

Map getMap()

Implementation

Map getMap() {
  var ret = {};
  if (effect != null) ret['id'] = EffectType.values.indexOf(effect!) + 1;
  ret['amplifier'] = Byte(amplifier != null ? amplifier! - 1 : 0);
  ret['duration'] = duration != null ? duration!.ticks : 0;
  ret['show_particles'] = Byte(
    showParticles != null && showParticles! ? 1 : 0,
  );
  return ret;
}