package com.hypixel.hytale.builtin.deployables.component; import com.hypixel.hytale.builtin.deployables.DeployablesPlugin; import com.hypixel.hytale.component.CommandBuffer; import com.hypixel.hytale.component.Component; import com.hypixel.hytale.component.ComponentType; import com.hypixel.hytale.component.Ref; import com.hypixel.hytale.math.vector.Vector3d; import com.hypixel.hytale.server.core.modules.projectile.config.ProjectileConfig; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import java.util.List; import java.util.UUID; import javax.annotation.Nonnull; public class DeployableProjectileShooterComponent implements Component { protected final List> projectiles = new ObjectArrayList(); protected final List> projectilesForRemoval = new ObjectArrayList(); protected Ref activeTarget; public static ComponentType getComponentType() { return DeployablesPlugin.get().getDeployableProjectileShooterComponentType(); } public void spawnProjectile( Ref entityRef, @Nonnull CommandBuffer commandBuffer, @Nonnull ProjectileConfig projectileConfig, @Nonnull UUID ownerUuid, @Nonnull Vector3d spawnPos, @Nonnull Vector3d direction ) { commandBuffer.getExternalData().getWorld().execute(() -> {}); } public List> getProjectiles() { return this.projectiles; } public List> getProjectilesForRemoval() { return this.projectilesForRemoval; } public Ref getActiveTarget() { return this.activeTarget; } public void setActiveTarget(Ref target) { this.activeTarget = target; } @Override public Component clone() { return this; } }