// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.deployables.component;

import com.hypixel.hytale.math.vector.Vector3d;
import java.util.UUID;
import com.hypixel.hytale.server.core.modules.projectile.config.ProjectileConfig;
import javax.annotation.Nonnull;
import com.hypixel.hytale.component.CommandBuffer;
import com.hypixel.hytale.builtin.deployables.DeployablesPlugin;
import com.hypixel.hytale.component.ComponentType;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import com.hypixel.hytale.component.Ref;
import java.util.List;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Component;

public class DeployableProjectileShooterComponent implements Component<EntityStore>
{
    protected final List<Ref<EntityStore>> projectiles;
    protected final List<Ref<EntityStore>> projectilesForRemoval;
    protected Ref<EntityStore> activeTarget;
    
    public DeployableProjectileShooterComponent() {
        this.projectiles = new ObjectArrayList<Ref<EntityStore>>();
        this.projectilesForRemoval = new ObjectArrayList<Ref<EntityStore>>();
    }
    
    public static ComponentType<EntityStore, DeployableProjectileShooterComponent> getComponentType() {
        return DeployablesPlugin.get().getDeployableProjectileShooterComponentType();
    }
    
    public void spawnProjectile(final Ref<EntityStore> entityRef, @Nonnull final CommandBuffer<EntityStore> commandBuffer, @Nonnull final ProjectileConfig projectileConfig, @Nonnull final UUID ownerUuid, @Nonnull final Vector3d spawnPos, @Nonnull final Vector3d direction) {
        commandBuffer.getExternalData().getWorld().execute(() -> {});
    }
    
    public List<Ref<EntityStore>> getProjectiles() {
        return this.projectiles;
    }
    
    public List<Ref<EntityStore>> getProjectilesForRemoval() {
        return this.projectilesForRemoval;
    }
    
    public Ref<EntityStore> getActiveTarget() {
        return this.activeTarget;
    }
    
    public void setActiveTarget(final Ref<EntityStore> target) {
        this.activeTarget = target;
    }
    
    @Override
    public Component<EntityStore> clone() {
        return this;
    }
}
