package dev.crucifixbeta.api.events.impl;

import dev.crucifixbeta.api.events.Event;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.projectile.FireworkRocketEntity;

@Environment(EnvType.CLIENT)
public class RemoveFireworkEvent extends Event {
   public static final RemoveFireworkEvent instance = new RemoveFireworkEvent();
   private FireworkRocketEntity entity;

   private RemoveFireworkEvent() {
   }

   public static RemoveFireworkEvent get(FireworkRocketEntity entity) {
      instance.entity = entity;
      instance.setCancelled(false);
      return instance;
   }

   public FireworkRocketEntity getRocketEntity() {
      return this.entity;
   }
}
