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 TickEntityEvent extends Event {
   private static final TickEntityEvent INSTANCE = new TickEntityEvent();
   private Entity entity;

   private TickEntityEvent() {
   }

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

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