generate method

  1. @override
Widget generate(
  1. Context context
)
override

Implementation

@override
Widget generate(Context context) {
  return For.of([
    Scoreboard('objd_click',
        type: 'minecraft.used:minecraft.carrot_on_a_stick'),
    Execute.asat(
      Entity.All(
          scores: [
            _score.matchesRange(
              Range.from(1),
            ),
          ],
          nbt: selectedItem != null
              ? {'SelectedItem': selectedItem!.getMap()}
              : null),
      children: [
        File.execute(path + name, create: false),
      ],
    ),
  ]);
}