Added remaining entity goals
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
|
||||
/**
|
||||
* Restrict sun.
|
||||
*/
|
||||
public record EntityGoalRestrictSun(
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
|
||||
/**
|
||||
* Stroll through village.
|
||||
*
|
||||
* @param searchRange The search range.
|
||||
*/
|
||||
public record EntityGoalStrollThroughVillage(
|
||||
int searchRange
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Be tempted by holding items.
|
||||
*
|
||||
* @param speed The speed at which the entity follows the item.
|
||||
* @param items The items that the entity will be attracted by.
|
||||
* @param canBeScared If the entity can be scared and lose track of the item.
|
||||
*/
|
||||
public record EntityGoalTempt(
|
||||
double speed,
|
||||
Collection<ItemStack> items,
|
||||
boolean canBeScared
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
|
||||
/**
|
||||
* Try to find water.
|
||||
*/
|
||||
public record EntityGoalTryFindWater(
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Use item.
|
||||
*
|
||||
* @param item The item.
|
||||
* @param sound The sound to play on use.
|
||||
* @param condition The condition when to use the item.
|
||||
*/
|
||||
public record EntityGoalUseItem(
|
||||
@NotNull ItemStack item,
|
||||
@NotNull Sound sound,
|
||||
@NotNull Predicate<LivingEntity> condition
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
|
||||
/**
|
||||
* Fly randomly while avoiding water.
|
||||
*
|
||||
* @param speed The speed.
|
||||
*/
|
||||
public record EntityGoalWaterAvoidingRandomFlying(
|
||||
double speed
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.willfp.eco.core.entities.ai.goals.entity;
|
||||
|
||||
import com.willfp.eco.core.entities.ai.goals.EntityGoal;
|
||||
|
||||
/**
|
||||
* Stroll randomly while avoiding water.
|
||||
*
|
||||
* @param speed The speed.
|
||||
* @param chance The chance to stroll every tick, as a percentage.
|
||||
*/
|
||||
public record EntityGoalWaterAvoidingRandomStroll(
|
||||
double speed,
|
||||
double chance
|
||||
) implements EntityGoal {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user