public final class EntityUtils
extends java.lang.Object
| Constructor and Description |
|---|
EntityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEntitiesCloseEnough(net.minecraft.entity.Entity firstEntity,
net.minecraft.entity.Entity secondEntity,
double maxDistance)
Checks if two entities are close enough together.
|
static double |
getDistanceBetweenEntities(net.minecraft.entity.Entity firstEntity,
net.minecraft.entity.Entity secondEntity)
Calculates the distance between two entities.
|
static void |
pushTowards(net.minecraft.entity.Entity entityToMove,
net.minecraft.entity.Entity destination,
double force)
Pushes an entity towards another one.
|
public static double getDistanceBetweenEntities(net.minecraft.entity.Entity firstEntity,
net.minecraft.entity.Entity secondEntity)
firstEntity: - The first entity to use.secondEntity: - The second entity to use.public static void pushTowards(net.minecraft.entity.Entity entityToMove,
net.minecraft.entity.Entity destination,
double force)
entityToMove: - The entity that should be pushed towards the other entity.destination: - The destination entity, that the entity to move should be pushed
towards.force: - The amount of force to push the entityToMove with.public static boolean areEntitiesCloseEnough(net.minecraft.entity.Entity firstEntity,
net.minecraft.entity.Entity secondEntity,
double maxDistance)
firstEntity: - The first entity to check.secondEntity: - The second entity to check.maxDistance: - The maximum distance that the entities can be apart.