ServerEvents.tags("block", (event) => {
  event.add("the_bumblezone:ancient_waxes", /^the_bumblezone:ancient_wax.*/);
  event.add("the_bumblezone:ancient_waxes", /^the_bumblezone:luminescent.*/);
});

BlockEvents.broken((event) => {
  const player = event.player;
  const nbt = player.nbt.ForgeCaps["the_bumblezone:player_data"];

  // if the player is in creative mode, they can break the block
  if (player.isCreative()) {
    return;
  }

  if (
    !nbt.toString().contains("is_bee_essenced:1") &&
    event.block.hasTag("the_bumblezone:ancient_waxes")
  ) {
    event.player.tell(
      "You gotta be friends with da Queeeeen Bee to mine this!"
    );
    event.cancel();
  }
});
