Added more entity goals

This commit is contained in:
Auxilor
2022-03-01 20:20:02 +00:00
parent 02497d485b
commit e09e9b4e8d
9 changed files with 180 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
package com.willfp.eco.core.entities.ai.goals.entity;
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
/**
* Move around randomly.
*
* @param speed The speed at which to move around.
* @param interval The amount of ticks to wait (on average) between strolling around.
* @param canDespawn If the entity can despawn.
*/
public record EntityGoalRandomStroll(
double speed,
int interval,
boolean canDespawn
) implements EntityGoal {
}

View File

@@ -0,0 +1,16 @@
package com.willfp.eco.core.entities.ai.goals.entity;
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
/**
* Swim around randomly.
*
* @param speed The speed at which to move around.
* @param interval The amount of ticks to wait (on average) between strolling around.
*/
public record EntityGoalRandomSwimming(
double speed,
int interval
) implements EntityGoal {
}

View File

@@ -0,0 +1,22 @@
package com.willfp.eco.core.entities.ai.goals.entity;
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
/**
* Ranged attack.
* <p>
* Only supports mobs that have ranged attacks.
*
* @param mobSpeed The mob speed.
* @param minInterval The minimum interval between attacks (in ticks).
* @param maxInterval The maximum interval between attacks (in ticks).
* @param maxRange The max range at which to attack.
*/
public record EntityGoalRangedAttack(
double mobSpeed,
int minInterval,
int maxInterval,
double maxRange
) implements EntityGoal {
}

View File

@@ -0,0 +1,20 @@
package com.willfp.eco.core.entities.ai.goals.entity;
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
/**
* Ranged attack.
* <p>
* Only supports monsters that have bow attacks.
*
* @param speed The speed.
* @param attackInterval The interval between attacks (in ticks).
* @param range The max range at which to attack.
*/
public record EntityGoalRangedBowAttack(
double speed,
int attackInterval,
double range
) implements EntityGoal {
}

View File

@@ -0,0 +1,18 @@
package com.willfp.eco.core.entities.ai.goals.entity;
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
/**
* Ranged attack.
* <p>
* Only supports monsters that have crossbow attacks.
*
* @param speed The speed.
* @param range The max range at which to attack.
*/
public record EntityGoalRangedCrossbowAttack(
double speed,
double range
) implements EntityGoal {
}