set static method

Data set(
  1. Entity entity, {
  2. Time? duration,
  3. Time? start,
  4. double? shadowStrength,
  5. Transformation? transformation,
  6. double? shadowRadius,
  7. int? textOpacity,
})

Given the entity and display fields, this constructs a data command setting the values.

Implementation

static Data set(
  Entity entity, {
  Time? duration,
  Time? start,
  double? shadowStrength,
  Transformation? transformation,
  double? shadowRadius,
  int? textOpacity,
}) {
  final data = Display.text(
    Location.here(),
    TextComponent.none(),
    shadowRadius: shadowRadius,
    shadowStrength: shadowStrength,
    transformation: transformation,
    textOpacity: textOpacity,
    interpolationDuration: duration,
    startInterpolation: start,
  ).getNbt(false);
  data.remove('text');
  return Data.merge(entity, nbt: data);
}