import { world } from "@minecraft/server";
import { AntHillBlock } from "./block/AntHillBlock";
import { AntiVenomPotion } from "./item/AntiVenom";
import { FatItem } from "./item/Fat";
import { ToothDagger } from "./item/ToothDagger";
import { StinkyBalloon } from "./item/StinkyBalloon";
import { QueenAnt } from "./item/QueenAnt";
export class Register {
  constructor() {
    Register.#registerBlockEvents();
    Register.#registerItemEvents();
  }
  static #registerBlockEvents() {
    world.beforeEvents.worldInitialize.subscribe((e) => {
      e.blockComponentRegistry.registerCustomComponent(AntHillBlock.COMPONENT_ID, new AntHillBlock());
    });
  }
  static #registerItemEvents() {
    world.beforeEvents.worldInitialize.subscribe((e) => {
      e.itemComponentRegistry.registerCustomComponent("sf_nba:tooth_dagger", new ToothDagger());
      e.itemComponentRegistry.registerCustomComponent("sf_nba:stinky_balloon", new StinkyBalloon());
      e.itemComponentRegistry.registerCustomComponent("sf_nba:fat", new FatItem());
      e.itemComponentRegistry.registerCustomComponent("sf_nba:antivenom_potion", new AntiVenomPotion());
      e.itemComponentRegistry.registerCustomComponent("sf_nba:queen_ant", new QueenAnt());
    });
  }
}
new Register();