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.Entity;

@Environment(EnvType.CLIENT)
public class EntitySpawnEvent extends Event {
   private static final EntitySpawnEvent INSTANCE = new EntitySpawnEvent();
   private Entity entity;

   private EntitySpawnEvent() {
   }

   public static EntitySpawnEvent get(Entity entity) {
      INSTANCE.entity = entity;
      INSTANCE.setCancelled(false);
      return INSTANCE;
   }

   public Entity getEntity() {
      return this.entity;
   }
}
